[FIX] website_event_booth_sale: fix typo type to detailed_type
PURPOSE A typo has been made with the following commit: https://github.com/odoo/odoo/commit/3d7b9bbf27298dc7f2f7e61a13120988f9bd422a This typo made the test unreachable so this commit corrects it. LINKS Task-2635461 PR: odoo/odoo#77081
This commit is contained in:
@@ -51,7 +51,7 @@ class SaleOrder(models.Model):
|
||||
def _cart_update(self, product_id=None, line_id=None, add_qty=0, set_qty=0, **kwargs):
|
||||
values = {}
|
||||
product = self.env['product.product'].browse(product_id)
|
||||
if product.type == 'event_booth' and set_qty > 1:
|
||||
if product.detailed_type == 'event_booth' and set_qty > 1:
|
||||
set_qty = 1
|
||||
values['warning'] = _('You cannot manually change the quantity of an Event Booth product.')
|
||||
values.update(super(SaleOrder, self)._cart_update(product_id, line_id, add_qty, set_qty, **kwargs))
|
||||
|
||||
@@ -8,4 +8,4 @@ class Website(models.Model):
|
||||
_inherit = 'website'
|
||||
|
||||
def sale_product_domain(self):
|
||||
return ['&'] + super(Website, self).sale_product_domain() + [('type', '!=', 'event_booth')]
|
||||
return ['&'] + super(Website, self).sale_product_domain() + [('detailed_type', '!=', 'event_booth')]
|
||||
|
||||
Reference in New Issue
Block a user