[FIX] mrp: skip archived operations in bom

Part-of: odoo/odoo#91879
This commit is contained in:
Ahmed Khalaf (ahkh)
2022-06-01 16:26:29 +02:00
parent c7c835f7a3
commit 1b2cf66f6e
+3
View File
@@ -107,6 +107,9 @@ class MrpRoutingWorkcenter(models.Model):
custom control.
"""
self.ensure_one()
# skip operation line if archived
if not self.active:
return True
if product._name == 'product.template':
return False
return not product._match_all_variant_values(self.bom_product_template_attribute_value_ids)