|
@ -269,6 +269,7 @@ class EventRegistration(models.Model): |
|
|
if reg.partner_id.email==reg.email: |
|
|
if reg.partner_id.email==reg.email: |
|
|
status=reg.partner_id.member_status |
|
|
status=reg.partner_id.member_status |
|
|
#le participant n'est pas la personne qui s'est connecté |
|
|
#le participant n'est pas la personne qui s'est connecté |
|
|
|
|
|
|
|
|
else: |
|
|
else: |
|
|
participant=self.env['res.partner'].sudo().search([('email','=',reg.email)],limit=1) |
|
|
participant=self.env['res.partner'].sudo().search([('email','=',reg.email)],limit=1) |
|
|
if participant: |
|
|
if participant: |
|
@ -276,7 +277,7 @@ class EventRegistration(models.Model): |
|
|
else: |
|
|
else: |
|
|
status='not member' |
|
|
status='not member' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
product_price=event.booking_price |
|
|
product_price=event.booking_price |
|
|
if status=='not member':product_price=event.booking_price |
|
|
if status=='not member':product_price=event.booking_price |
|
|
if status=='member':product_price=event.booking_member_price |
|
|
if status=='member':product_price=event.booking_member_price |
|
@ -290,13 +291,16 @@ class EventRegistration(models.Model): |
|
|
if membership_product: |
|
|
if membership_product: |
|
|
if selected_registrant_options: |
|
|
if selected_registrant_options: |
|
|
for opt in selected_registrant_options: |
|
|
for opt in selected_registrant_options: |
|
|
if opt.booking_option_id==membership_product.id: |
|
|
|
|
|
|
|
|
#raise Warning("opt.booking_option_id="+str(opt.booking_option_id.id)+" membership_product.id="+str(membership_product.id)) |
|
|
|
|
|
if opt.booking_option_id.id==membership_product.id: |
|
|
membership_option=True |
|
|
membership_option=True |
|
|
|
|
|
|
|
|
if status!="super member": |
|
|
if status!="super member": |
|
|
product_price=event.booking_member_price |
|
|
product_price=event.booking_member_price |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if self.payment_adjustement!=0: |
|
|
if self.payment_adjustement!=0: |
|
|
product_price=product_price+self.payment_adjustement |
|
|
product_price=product_price+self.payment_adjustement |
|
|
|
|
|
|
|
|
#calcul du montant total à régler |
|
|
#calcul du montant total à régler |
|
|
if end_of_stay_invoice:product_price=0 |
|
|
if end_of_stay_invoice:product_price=0 |
|
|
|
|
|
|
|
|