mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[FIX] mrp_multi_level: Recompute main supplier in MRP Parameter if we change MRP Area
This commit is contained in:
@@ -184,7 +184,9 @@ class ProductMRPArea(models.Model):
|
||||
rule = group_obj._get_rule(rec.product_id, proc_loc, values)
|
||||
rec.supply_method = rule.action if rule else "none"
|
||||
|
||||
@api.depends("supply_method", "product_id.route_ids", "product_id.seller_ids")
|
||||
@api.depends(
|
||||
"mrp_area_id", "supply_method", "product_id.route_ids", "product_id.seller_ids"
|
||||
)
|
||||
def _compute_main_supplier(self):
|
||||
"""Simplified and similar to procurement.rule logic."""
|
||||
for rec in self.filtered(lambda r: r.supply_method == "buy"):
|
||||
|
||||
Reference in New Issue
Block a user