Skip to content
Snippets Groups Projects
Commit 440daf2d authored by Florian Charlier's avatar Florian Charlier
Browse files

[FIX] event_sale: create tickets with default product type "service"


In some cases when creating a new ticket, the default product
type shown is a "Consumable". It should rather be handled as a
"Service". In later versions, a detailed type is created, but the
base product type should be set to service too.

This commit uses the `product_id` `context` to set the default
type to "service" and check "Is an Event Ticket".

Task-2655226

closes odoo/odoo#78362

X-original-commit: 741086da
Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
parent 5db99623
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
<field name="inherit_id" ref="event.event_type_ticket_view_tree_from_type"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="product_id"/>
<field name="product_id" context="{'default_event_ok': 1, 'default_type': 'service'}"/>
</field>
<field name="description" position="after">
<field name="price"/>
......@@ -22,7 +22,7 @@
<field name="inherit_id" ref="event.event_type_ticket_view_form_from_type"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="product_id"/>
<field name="product_id" context="{'default_event_ok': 1, 'default_type': 'service'}"/>
</field>
<field name="description" position="after">
<field name="price"/>
......@@ -43,7 +43,7 @@
<attribute name="string">Sales End</attribute>
</field>
<field name="name" position="after">
<field name="product_id" context="{'default_event_ok': 1}"/>
<field name="product_id" context="{'default_event_ok': 1, 'default_type': 'service'}"/>
</field>
<field name="description" position="after">
<field name="price"/>
......@@ -57,7 +57,7 @@
<field name="inherit_id" ref="event.event_event_ticket_view_form_from_event"/>
<field name="arch" type="xml">
<field name="name" position="after">
<field name="product_id" context="{'default_event_ok':1}"/>
<field name="product_id" context="{'default_event_ok':1, 'default_type': 'service'}"/>
</field>
<field name="description" position="after">
<field name="price"/>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment