Browse Source

corrections

dev-rcn
root 3 years ago
parent
commit
a89ac78698
4 changed files with 14 additions and 2 deletions
  1. +5
    -0
      models/booking_donation.py
  2. +6
    -1
      models/event.py
  3. +1
    -1
      views/membership.xml
  4. +2
    -0
      views/website_event_registration.xml

+ 5
- 0
models/booking_donation.py View File

@ -13,6 +13,11 @@ class DonationDonation(models.Model):
track_visibility='onchange',
)
# def remove_draft_donation(self):
# donation_draft=self.env['donation.donation'].search([('event_registration_id','=',False),('state','=','draft')])
# if donation_draft:
# for d in donation_draft:
# date

+ 6
- 1
models/event.py View File

@ -75,7 +75,12 @@ class KalachakraEvent(models.Model):
@api.depends('seats_unconfirmed', 'seats_reserved', 'seats_used')
def _compute_seats_expected(self):
for event in self:
event.seats_expected = len(event.registration_ids)
i=0
for reg_id in event.registration_ids:
reg=self.env['event.registration'].search([('id','=',int(reg_id))])
if reg.state in ('draft','open','done'):i=i+1
event.seats_expected=i
def bulk_change_date_events(self,name,date_start_str,hour):


+ 1
- 1
views/membership.xml View File

@ -5,7 +5,7 @@
<field name="name">kalachakra_member list</field>
<field name="model">kalachakra.membership</field>
<field name="arch" type="xml">
<tree>
<tree default_order='create_date desc'>
<field name="create_date"/>
<field name="partner_id"/>


+ 2
- 0
views/website_event_registration.xml View File

@ -183,9 +183,11 @@
<br></br>
<br></br>
</t>
<t t-if="not online">
<h7>If you want pay on the spot, click here : </h7><button type="submit" id="pay_on_the_spot_btn" class="btn btn-primary" >I will pay the participation on the spot</button>
<br></br>
<br></br>
</t>
</t>
</t>
<br></br>


Loading…
Cancel
Save