Merge PR #856 into 15.0

Signed-off-by LoisRForgeFlow
This commit is contained in:
OCA-git-bot
2022-09-16 11:58:15 +00:00
3 changed files with 6 additions and 2 deletions

View File

@@ -188,7 +188,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"):

View File

@@ -43,6 +43,7 @@
<field name="product_id" />
<field name="mrp_area_id" />
<field name="name" />
<field name="origin" />
<field name="fixed" />
</group>
<group>

View File

@@ -541,7 +541,8 @@ class MultiLevelMrp(models.TransientModel):
else:
last_date = fields.Date.from_string(move.mrp_date)
onhand += move.mrp_qty
demand_origin.append(move.origin or move.name or "")
if move.mrp_type == "d":
demand_origin.append(move.origin or move.name)
if last_date and last_qty != 0.00:
name = _(