From 7466f2cae8c3d649e0eec82c7d7567a8d4c6de4f Mon Sep 17 00:00:00 2001 From: Arnold Moyaux Date: Thu, 16 Jan 2020 09:03:24 +0000 Subject: [PATCH] [FIX] mrp: allow to use variant in order to build another variant Usecase for example A black T-shirt made from a white T-shirt and black color. This behavior was possible in 12.0 and 11.0 and was removed by commit 77a8d92196924075f3e822fd218f57142cf20284 Close #40540 closes odoo/odoo#44084 X-original-commit: 575353e251a0cce3bbff759edaeb56b5718beb11 Signed-off-by: Arnold Moyaux --- addons/mrp/models/mrp_bom.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/mrp/models/mrp_bom.py b/addons/mrp/models/mrp_bom.py index aaec659c9d0..6b781b8b30a 100644 --- a/addons/mrp/models/mrp_bom.py +++ b/addons/mrp/models/mrp_bom.py @@ -86,8 +86,6 @@ class MrpBom(models.Model): for bom_line in bom.bom_line_ids: if bom.product_id and bom_line.product_id == bom.product_id: raise ValidationError(_("BoM line product %s should not be the same as BoM product.") % bom.display_name) - if bom_line.product_tmpl_id == bom.product_tmpl_id: - raise ValidationError(_("BoM line product %s should not be the same as BoM product.") % bom.display_name) if bom.product_id and bom_line.bom_product_template_attribute_value_ids: raise ValidationError(_("BoM cannot concern product %s and have a line with attributes (%s) at the same time.") % (bom.product_id.display_name, ", ".join([ptav.display_name for ptav in bom_line.bom_product_template_attribute_value_ids])))