From 9c3c5052ee6b622e2aef9638cc1359615ea5b695 Mon Sep 17 00:00:00 2001 From: Lois Rilo Date: Wed, 24 Mar 2021 17:31:21 +0100 Subject: [PATCH] [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. --- mrp_multi_level/wizards/mrp_multi_level.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mrp_multi_level/wizards/mrp_multi_level.py b/mrp_multi_level/wizards/mrp_multi_level.py index 761111e2d..61edd34e2 100644 --- a/mrp_multi_level/wizards/mrp_multi_level.py +++ b/mrp_multi_level/wizards/mrp_multi_level.py @@ -71,7 +71,7 @@ class MultiLevelMrp(models.TransientModel): parent_product_id = ( move_dest_id.production_id.product_id or move_dest_id.product_id ).id - else: + if not order_number: order_number = (move.picking_id or move).name origin = "mv" mrp_date = date.today()