Browse Source

corrections

dev-rcn
root 3 years ago
parent
commit
75eeb57dcb
8 changed files with 33 additions and 20 deletions
  1. +2
    -0
      controllers/booking.py
  2. +5
    -1
      models/booking_event_registration.py
  3. +1
    -0
      models/event.py
  4. +9
    -4
      views/booking_event_registration.xml
  5. +12
    -0
      views/booking_website_registration.xml
  6. +2
    -0
      views/event.xml
  7. +0
    -15
      views/event_registration.xml
  8. +2
    -0
      views/website_event_registration.xml

+ 2
- 0
controllers/booking.py View File

@ -95,6 +95,7 @@ class booking(WebsiteEventController,AuthSignupHome):
vals['event_id']=post.get('event_id')
vals['name']=post.get('name')
vals['phone']=post.get('phone')
vals['city']=post.get('city')
vals['email']=post.get('email')
vals['firstname']=post.get('firstname')
@ -143,6 +144,7 @@ class booking(WebsiteEventController,AuthSignupHome):
vals['partner_id']=request.session['partner_id']
vals['name']=request.session['registrant']['name']
vals['phone']=request.session['registrant']['phone']
vals['city']=request.session['registrant']['city']
vals['email']=request.session['registrant']['email']
vals['firstname']=request.session['registrant']['firstname']
vals['age']=request.session['registrant']['age']


+ 5
- 1
models/booking_event_registration.py View File

@ -73,7 +73,11 @@ class EventRegistration(models.Model):
age=fields.Integer('Age')
gender=fields.Selection([('male','Male'),('femelle','Femelle')],string='gender')
mobile=fields.Char('Mobile')
city=fields.Char('City')
image_right_clearance=fields.Boolean('image right clearance')
train_arrival_time=fields.Float(string="train arrival time")
train_arrival_date=fields.Date(string="train arrival date")
kanban_color=fields.Char('kanban color',compute='_compute_kanban_color')
invoice_state=fields.Selection(related='invoice_id.payment_state')


+ 1
- 0
models/event.py View File

@ -69,6 +69,7 @@ class KalachakraEvent(models.Model):
parent_event_id=fields.Many2one('event.event',string='parent event', readonly=True)
find_out_more_link=fields.Char('Find out more link')
city=fields.Char('city', related="address_id.city")
no_online_payment=fields.Boolean('no online payment')


+ 9
- 4
views/booking_event_registration.xml View File

@ -60,12 +60,14 @@
<field name="gender" attrs="{'invisible':[('booking_event','!=',True)]}"/>
<field name="age" attrs="{'invisible':[('booking_event','!=',True)]}"/>
<field name="city" attrs="{'invisible':[('booking_event','!=',True)]}"/>
<field name="medical_concern" attrs="{'invisible':[('booking_event','!=',True)]}"/>
<field name="medical_information" attrs="{'invisible':[('booking_event','!=',True)]}"/>
<field name="medical_contact_name" attrs="{'invisible':[('booking_event','!=',True)]}"/>
<field name="medical_contact_phone" attrs="{'invisible':[('booking_event','!=',True)]}"/>
<field name="room_id" attrs="{'invisible':[('booking_event','!=',True)]}"/>
<field name="train_arrival_date" widget="date" attrs="{'invisible':[('booking_event','!=',True)]}"/>
<field name="train_arrival_time" widget="float_time" attrs="{'invisible':[('booking_event','!=',True)]}"/>
</xpath>
@ -197,10 +199,13 @@
<field name="model">event.registration</field>
<field name="inherit_id" ref="event.view_event_registration_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='event_ticket_id']" position="replace">
<field name="room_id" />
<field name="payment_status" />
<field name="room_id" />
<field name="train_arrival_date" widget="date" />
<field name="train_arrival_time" widget="float_time" />
<field name="payment_status"/>
</xpath>
</field>


+ 12
- 0
views/booking_website_registration.xml View File

@ -145,6 +145,18 @@
</div>
</div>
</div>
<div class="form-group s_website_form_field col-5 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: 200px" for="9ois9pkv0wv">
<span class="s_website_form_label_content">City</span>
<span class="s_website_form_mark"> *</span>
</label>
<div class="col-sm">
<input type="text" id='city' class="form-control s_website_form_input" name="city" t-att-value="partner.city" style="cursor: auto;"/>
</div>
</div>
</div>
<div class="form-group s_website_form_field col-5 s_website_form_custom " 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">


+ 2
- 0
views/event.xml View File

@ -22,6 +22,7 @@
<xpath expr="//field[@name='seats_used']" position="after">
<field string="calendar event id" name="calendar_event_id"/>
<field name="online_event"/>
<field name="onthespot_event"/>
<field name="free_participation"/>
@ -67,6 +68,7 @@
<field name="online_event" attrs="{'invisible':[('booking_event','=',True)]}"/>
<field name="no_online_payment" attrs="{'invisible':[('booking_event','=',True)]}"/>
<field name="online_only" attrs="{'invisible':[('booking_event','=',True)]}"/>
<field name="free_participation" attrs="{'invisible':[('booking_event','=',True)]}"/>
<field name="recurring_event" attrs="{'invisible':[('booking_event','=',True)]}"/>


+ 0
- 15
views/event_registration.xml View File

@ -26,21 +26,6 @@
</field>
</record>
<record id="kalachakra_event_registration_view_tree" model="ir.ui.view">
<field name="name">kalachakra.event.registration.tree.inherit</field>
<field name="model">event.registration</field>
<field name="inherit_id" ref="event.view_event_registration_tree"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='create_date']" position="after">
<field name="online" attrs="{'invisible':[('booking_event','=',True)]}"/>
<field name="onthespot_payment" attrs="{'invisible':[('booking_event','=',True)]}"/>
<field name="booking_event" invisible="1"/>
</xpath>
</field>
</record>
</odoo>

+ 2
- 0
views/website_event_registration.xml View File

@ -155,6 +155,7 @@
<br></br>
</t>
</t>
<t t-if="not event.no_online_payment">
<t t-if="payment_status!='paid'">
<t t-if="not event.free_participation">
<t t-if="partner.member_status in ('not member','member')">
@ -196,6 +197,7 @@
</div>
</div>
</t> -->
</t>
</t>
<br></br>
<br></br>


Loading…
Cancel
Save