diff --git a/controllers/booking.py b/controllers/booking.py index ed12c42..ed4ae97 100644 --- a/controllers/booking.py +++ b/controllers/booking.py @@ -109,7 +109,7 @@ class booking(WebsiteEventController,AuthSignupHome): request.session['down_payment'] =False if post.get('down_payment')=="false":request.session['down_payment'] = False if post.get('down_payment')=="true":request.session['down_payment'] = True - + #options if post.get('nb_o')!="0": diff --git a/models/booking_event_registration.py b/models/booking_event_registration.py index 5142404..23ad406 100644 --- a/models/booking_event_registration.py +++ b/models/booking_event_registration.py @@ -635,7 +635,7 @@ class EventRegistration(models.Model): if prd.donation: self.sudo().create_donation(reg.id,reg.partner_id,vals['product_id'],vals['price_unit']) reg.balance_invoice_id=invoice.id - return invoice.id + return reg.down_payment_invoice_id def info_objet(self,model_id,objet_id): field_list=request.env[model_id].sudo().fields_get() diff --git a/static/js/booking.js b/static/js/booking.js index 0cae968..95bc586 100644 --- a/static/js/booking.js +++ b/static/js/booking.js @@ -86,11 +86,29 @@ odoo.define('booking.main', function (require) { $('#validation_message').text('merci de répondre à la demande d\'autorisation de l\'utilisation de votre image') $('#validation_message').show() } - else { - $('#form2').submit() + if ($('#medical_contact_name').val()=='') + { + $('#validation_message').text('merci de saisir le nom du contact') + $('#validation_message').show() + + + } + else if ($('#medical_contact_phone').val()=='') + { + $('#validation_message').text('merci de saisir le téléphone du contact') + $('#validation_message').show() + + + } + else + { + $('#form2').submit() + } + } + diff --git a/views/booking_event_registration.xml b/views/booking_event_registration.xml index 79f78fb..5e79e54 100644 --- a/views/booking_event_registration.xml +++ b/views/booking_event_registration.xml @@ -232,6 +232,7 @@ + diff --git a/views/booking_website_registration.xml b/views/booking_website_registration.xml index 926978f..e78a408 100644 --- a/views/booking_website_registration.xml +++ b/views/booking_website_registration.xml @@ -33,7 +33,7 @@
Total Price :
- +
- @@ -53,7 +53,7 @@

Please select your booking options :


- + @@ -243,25 +243,25 @@
Please provide us with the contact details of a loved one in the event of a problem encountered during your stay:
-
+
+ *
- +
-
+
+ *
- +