From bd8f39a4320b88bf63c79454a74caa9122dd133a Mon Sep 17 00:00:00 2001 From: Victor Feyens Date: Thu, 7 Apr 2022 07:59:41 +0000 Subject: [PATCH] [FIX] sale_management: product should not be required on template lines Because some lines can be sections/notes without a product, and the product presence when needed is already verified by the sql constraints. Fixes the mistake from #81818 closes odoo/odoo#88244 X-original-commit: fd903101f564b1817f7b5a6aa099f644ef29a527 Signed-off-by: Victor Feyens (vfe) --- addons/sale_management/models/sale_order_template.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale_management/models/sale_order_template.py b/addons/sale_management/models/sale_order_template.py index da85a4e5904..183644099b5 100644 --- a/addons/sale_management/models/sale_order_template.py +++ b/addons/sale_management/models/sale_order_template.py @@ -156,7 +156,7 @@ class SaleOrderTemplateLine(models.Model): product_id = fields.Many2one( comodel_name='product.product', - required=True, check_company=True, + check_company=True, domain="[('sale_ok', '=', True), ('company_id', 'in', [company_id, False])]") name = fields.Text(