diff --git a/addons/account/account_invoice.py b/addons/account/account_invoice.py index e94a60a545c..e2eddf5b9b0 100644 --- a/addons/account/account_invoice.py +++ b/addons/account/account_invoice.py @@ -1261,7 +1261,7 @@ class account_invoice_line(models.Model): uos_id = fields.Many2one('product.uom', string='Unit of Measure', ondelete='set null', index=True) product_id = fields.Many2one('product.product', string='Product', - ondelete='set null', index=True) + ondelete='restrict', index=True) account_id = fields.Many2one('account.account', string='Account', required=True, domain=[('type', 'not in', ['view', 'closed'])], default=_default_account, diff --git a/addons/product/product_view.xml b/addons/product/product_view.xml index c764ab06045..01c9ff2d721 100644 --- a/addons/product/product_view.xml +++ b/addons/product/product_view.xml @@ -250,6 +250,11 @@ +

+ Warning: adding or deleting attributes + will delete and recreate existing variants and lead + to the loss of its eventual customizations. +