Skip to content

Commit

Permalink
[FIX] website_event_sale: company mandatory to access pricelist
Browse files Browse the repository at this point in the history
Before this commit, when creating an event without setting the company,
an error 500 is raised, this arises because the pricelist is not found,
it depends on the company.

Now, the company field is mandatory and the pricelist is reachable.

opw-2079246

closes odoo#37975

Signed-off-by: Jorge Pinna Puissant (jpp) <[email protected]>
  • Loading branch information
jpp-odoo committed Oct 4, 2019
1 parent 0bd82ef commit bd1e5f7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions addons/website_event_sale/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
'data': [
'data/event_data.xml',
'views/event_templates.xml',
'views/event_views.xml',
'security/ir.model.access.csv',
'security/website_event_sale_security.xml',
],
Expand Down
12 changes: 12 additions & 0 deletions addons/website_event_sale/views/event_views.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<odoo>
<record id="event_form_mandatory_company" model="ir.ui.view">
<field name="name">event.event.view.form.inherit.company.mandatory</field>
<field name="model">event.event</field>
<field name="inherit_id" ref="event.view_event_form"/>
<field name="arch" type="xml">
<xpath expr="//field[@name='company_id']" position="attributes">
<attribute name="required">1</attribute>
</xpath>
</field>
</record>
</odoo>

0 comments on commit bd1e5f7

Please sign in to comment.