mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
@@ -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"):
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
<field name="product_id" />
|
||||
<field name="mrp_area_id" />
|
||||
<field name="name" />
|
||||
<field name="origin" />
|
||||
<field name="fixed" />
|
||||
</group>
|
||||
<group>
|
||||
|
||||
@@ -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 = _(
|
||||
|
||||
Reference in New Issue
Block a user