[FIX] event_booth_sale: add ondelete cascade to sol in registrations

PURPOSE

Before this commit it's impossible to unlink a sale order line containing
a booth product (the ondelete parameter is unset thus default to restrict)
After this commit this bug is fixed.
Further explanation on the task implying a bug on the database setting
the on delete to cascade despite the default value...

LINKS

Task-2749521
PR : odoo/odoo#83685

closes odoo/odoo#83767

X-original-commit: e8d96fb1cfd5016f12dc43b988a8a0450bf36a04
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
Patrick Hoste
2022-02-01 15:32:26 +00:00
parent d497dbe919
commit b89f630d73
@@ -11,7 +11,7 @@ class EventBoothRegistration(models.Model):
_name = 'event.booth.registration'
_description = 'Event Booth Registration'
sale_order_line_id = fields.Many2one('sale.order.line', string='Sale Order Line', required=True)
sale_order_line_id = fields.Many2one('sale.order.line', string='Sale Order Line', required=True, ondelete='cascade')
event_booth_id = fields.Many2one('event.booth', string='Booth', required=True)
partner_id = fields.Many2one(
'res.partner', related='sale_order_line_id.order_partner_id', store=True)