mirror of
https://github.com/OCA/manufacture.git
synced 2025-01-28 16:37:15 +02:00
[14.0][FIX] mrp_multi_level: error with 3 step delivery.
If the destination moves do not include a MO, the mrp move end up without a name that raises an error later. This can happen with 3 setep delivery but also with in more cases in wich there is a chain of stock moves. We ensure that the variable `order_number` always have a value.
This commit is contained in:
@@ -71,7 +71,7 @@ class MultiLevelMrp(models.TransientModel):
|
|||||||
parent_product_id = (
|
parent_product_id = (
|
||||||
move_dest_id.production_id.product_id or move_dest_id.product_id
|
move_dest_id.production_id.product_id or move_dest_id.product_id
|
||||||
).id
|
).id
|
||||||
else:
|
if not order_number:
|
||||||
order_number = (move.picking_id or move).name
|
order_number = (move.picking_id or move).name
|
||||||
origin = "mv"
|
origin = "mv"
|
||||||
mrp_date = date.today()
|
mrp_date = date.today()
|
||||||
|
|||||||
Reference in New Issue
Block a user