Browse Source

corrections

dev-rcn
root 3 years ago
parent
commit
b914ecec35
3 changed files with 23 additions and 3 deletions
  1. +2
    -2
      models/event.py
  2. +1
    -1
      views/event.xml
  3. +20
    -0
      views/product.xml

+ 2
- 2
models/event.py View File

@ -230,7 +230,7 @@ class KalachakraEvent(models.Model):
if prd.price_per=='day': if prd.price_per=='day':
price=option.list_price*self.duration price=option.list_price*self.duration
if prd.price_per=='night': if prd.price_per=='night':
price=option.list_price*self.duration-1
price=option.list_price*(self.duration-1)
vals['event_id']=self.id vals['event_id']=self.id
vals['booking_option_id']=option.id vals['booking_option_id']=option.id
@ -302,7 +302,7 @@ class KalachakraEvent(models.Model):
name_param=self.name.replace(' ','-') name_param=self.name.replace(' ','-')
name_param=name_param.replace('\'','-') name_param=name_param.replace('\'','-')
description='<a href="'+self.env['ir.config_parameter'].sudo().get_param('web.base.url')+'/event/'+name_param+'-'+date_param+'/register">Click here to register</a>'
description='<a href="'+self.env['ir.config_parameter'].sudo().get_param('web.base.url')+'/event/'+name_param+'-'+date_param+'/register">Cliquer ici pour s\'inscrire</a>'
#str(self.date_begin.year())+'-'+str(self.date_begin.month())+'-'+self.date_begin.day() #str(self.date_begin.year())+'-'+str(self.date_begin.month())+'-'+self.date_begin.day()
body={"summary": self.name, body={"summary": self.name,


+ 1
- 1
views/event.xml View File

@ -46,7 +46,7 @@
<field name="end_generation_date" widget="date" attrs="{'invisible':['|',('booking_event','=',True),('recurring_event','=',False)]}"/> <field name="end_generation_date" widget="date" attrs="{'invisible':['|',('booking_event','=',True),('recurring_event','=',False)]}"/>
<field name="parent_event_id" attrs="{'invisible':['|',('booking_event','=',True),('recurring_event','=',False)]}"/> <field name="parent_event_id" attrs="{'invisible':['|',('booking_event','=',True),('recurring_event','=',False)]}"/>
<field name="recurring_event_newsletter_id" attrs="{'invisible':['|',('booking_event','=',True),('recurring_event','=',False)]}"/>
<field name="recurring_event_newsletter_id" attrs="{'invisible':[('booking_event','=',True)]}"/>
<field name="find_out_more_link"/> <field name="find_out_more_link"/>
</xpath> </xpath>


+ 20
- 0
views/product.xml View File

@ -20,4 +20,24 @@
</div> </div>
</field> </field>
</record> </record>
<record id="kalachakra.product_template_action" model="ir.actions.act_window">
<field name="name">Products</field>
<field name="type">ir.actions.act_window</field>
<field name="res_model">product.template</field>
<field name="view_mode">kanban,tree,form</field>
<field name="view_id" ref="product.product_template_kanban_view"/>
<field name="search_view_id" ref="product.product_template_search_view"/>
<field name="context">{"search_default_filter_booking_product_options":1}</field>
<field name="help" type="html">
<p class="o_view_nocontent_smiling_face">
Create a new product
</p><p>
You must define a product for everything you sell or purchase,
whether it's a storable product, a consumable or a service.
</p>
</field>
</record>
</odoo> </odoo>

Loading…
Cancel
Save