Browse Source

corrections facture acompte

dev-rcn
root 3 years ago
parent
commit
36a4f4c126
5 changed files with 32 additions and 13 deletions
  1. +1
    -1
      controllers/booking.py
  2. +1
    -1
      models/booking_event_registration.py
  3. +20
    -2
      static/js/booking.js
  4. +1
    -0
      views/booking_event_registration.xml
  5. +9
    -9
      views/booking_website_registration.xml

+ 1
- 1
controllers/booking.py View File

@ -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":


+ 1
- 1
models/booking_event_registration.py View File

@ -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()


+ 20
- 2
static/js/booking.js View File

@ -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()
}
}


+ 1
- 0
views/booking_event_registration.xml View File

@ -232,6 +232,7 @@
<xpath expr="//field[@name='event_ticket_id']" position="replace">
<field name="room_id" />
<field name="city" />
<field name="train_arrival_date" widget="date" />
<field name="train_arrival_time" widget="float_time" />
<field name="payment_status"/>


+ 9
- 9
views/booking_website_registration.xml View File

@ -33,7 +33,7 @@
</t>
<h6>Total Price : <span id="booking_total_price"></span></h6>
<form id="form1" action="questionnaire" method="post" class="form js_website_submit_form">
<div class="form-group s_website_form_field col- s_website_form_custom s_website_form_required " data-type="char" data-name="Field">
<div class="row s_col_no_resize s_col_no_bgcolor">
<label class="col-form-label col-sm-auto s_website_form_label" style="width: 400px">
@ -41,7 +41,7 @@
</label>
<div class="col- col-sm- col-md-">
<select id="down_payment" name="down_payment" class="form-control s_website_form_input">
<select form="form1" id="down_payment" name="down_payment" class="form-control s_website_form_input">
<option name="yes" value="true" label="Oui"></option>
<option name="no" selected="false" value="false" label="Non"></option>
@ -53,7 +53,7 @@
<br></br>
<h6>Please select your booking options :</h6>
<br></br>
<form id="form1" action="questionnaire" method="post" class="form js_website_submit_form">
<input type="hidden" id="booking_price_product" name="price_product" t-att-value="int(price)"/>
<input type="hidden" id="booking_price" name="booking_price" t-att-value="int(event.booking_price)"/>
@ -243,25 +243,25 @@
</div>
</div>
<h6>Please provide us with the contact details of a loved one in the event of a problem encountered during your stay:</h6>
<div class="form-group s_website_form_field col-6 s_website_form_custom" data-type="char" data-name="Field">
<div class="form-group s_website_form_field col-6 s_website_form_required" data-type="char" data-name="Field">
<div class="row s_col_no_resize s_col_no_bgcolor">
<label class="col-form-label col-sm-auto s_website_form_label" style="width: 200px" for="9ois9pkv0wv">
<span class="s_website_form_label_content">Name of the contact</span>
<span class="s_website_form_mark"></span>
</label>
<span class="s_website_form_mark"> *</span>
<div class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-3">
<input type="text" class="form-control s_website_form_input" name="medical_contact_name" value="" id="medical_contact_name" style="cursor: auto;"/>
<input type="text" class="form-control s_website_form_input" name="medical_contact_name" value="" required="1" id="medical_contact_name" style="cursor: auto;"/>
</div>
</div>
</div>
<div class="form-group s_website_form_field col-6 s_website_form_custom " data-type="char" data-name="Field">
<div class="form-group s_website_form_field col-6 s_website_form_required" data-type="char" data-name="Field">
<div class="row s_col_no_resize s_col_no_bgcolor">
<label class="col-form-label col-sm-auto s_website_form_label" style="width: 200px" for="9ois9pkv0wv">
<span class="s_website_form_label_content">Phone of the contact</span>
<span class="s_website_form_mark"></span>
</label>
<span class="s_website_form_mark"> *</span>
<div class="col-12 col-sm-12 col-md-6 col-lg-4 col-xl-3">
<input type="text" class="form-control s_website_form_input" name="medical_contact_phone" value="" id="medical_contact_phone" style="cursor: auto;"/>
<input type="text" class="form-control s_website_form_input" name="medical_contact_phone" value="" required="1" id="medical_contact_phone" style="cursor: auto;"/>
</div>
</div>
</div>


Loading…
Cancel
Save