diff --git a/addons/mrp/models/mrp_production.py b/addons/mrp/models/mrp_production.py index e45db5f7572..0ae22adec6e 100644 --- a/addons/mrp/models/mrp_production.py +++ b/addons/mrp/models/mrp_production.py @@ -344,7 +344,7 @@ class MrpProduction(models.Model): mo_by_picking_type_and_company_id[(mo.picking_type_id, mo.company_id.id)] |= mo for (picking_type, company_id), productions in mo_by_picking_type_and_company_id.items(): - boms_by_product = self.env['mrp.bom']._bom_find(productions.product_id, picking_type=picking_type, company_id=company_id, bom_type='normal') + boms_by_product = self.env['mrp.bom'].with_context(active_test=True)._bom_find(productions.product_id, picking_type=picking_type, company_id=company_id, bom_type='normal') for production in productions: if not production.bom_id or production.bom_id.product_tmpl_id != production.product_tmpl_id or (production.bom_id.product_id and production.bom_id.product_id != production.product_id): bom = boms_by_product[production.product_id]