Skip to content
Snippets Groups Projects
Commit 52da5bc7 authored by Nasreddin Boulif (bon)'s avatar Nasreddin Boulif (bon)
Browse files

[FIX] event_[booth_]sale: don't allow event product on quotation template

Current behavior:

In a sale order: a wizard pops up to complete the link with the event
and attendee when we add an event product (same issue with event booth).

In quotation template: the wizard doesn't pop up when we add an event as
optional product.

When we create a sales order with the quotation template, the event
is added as product but the wizard still does not pop up, and therefore,
the SO is not linked to the event.

After this commit:

  Don't allow adding event (or event booth) as optional product to a
  quotation template.
  A same fix was already done on products (not optional) here:
  https://github.com/odoo/odoo/pull/100499



opw-3081853

closes odoo/odoo#113720

X-original-commit: a6bc38598f695ead9d9816b6858823b28b4ba95d
Signed-off-by: default avatarNicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: default avatarNasreddin Boulif (bon) <bon@odoo.com>
parent eae83928
Branches
Tags
No related merge requests found
......@@ -10,3 +10,4 @@ from . import event_type_booth
from . import sale_order
from . import sale_order_line
from . import sale_order_template_line
from . import sale_order_template_option
from odoo import fields, models
class SaleOrderTemplateOption(models.Model):
_inherit = "sale.order.template.option"
product_id = fields.Many2one(domain="[('sale_ok', '=', True), ('detailed_type', 'not in', ['event', 'event_booth']), ('company_id', 'in', [company_id, False])]")
......@@ -7,3 +7,4 @@ from . import event_ticket
from . import sale_order
from . import product
from . import sale_order_template_line
from . import sale_order_template_option
from odoo import fields, models
class SaleOrderTemplateOption(models.Model):
_inherit = "sale.order.template.option"
product_id = fields.Many2one(domain="[('sale_ok', '=', True), ('detailed_type', '!=', 'event'), ('company_id', 'in', [company_id, False])]")
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment