From e3232c85b97fb727f3f64f1569bf2c24362ba332 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Wed, 1 Feb 2017 14:46:04 +0100 Subject: [PATCH] [FIX] mrp_byproduct: remove wrong move_dest_id link A byproduct is a produced when producing another product (the targetted product). A move can be linked to another move. eg: we could have a manufacturing order of 3 units linked to a move of a delivery order of these 3 units. If we produce 2 units, the manufacturing order is split in 2 units and 1 units, and the delivery order is split similarily because of the link 1. [T manufacturing move split] -> [T delivery move split] (T is the targetted product, B is the byproduct) But in 8c307d7b1 a move_dest_id of a byproduct was linked to the targetted product delivery move, thus in some situation the move of the delivery order of the byproduct would erroneously be split 2 times instead of one. 1. [B manufacturing move split] -> [T delivery move split] 2. [T manufacturing move split] -> [T delivery move split] This could also be the source of other issue, and since the byproduct and targetted product are different, the link should anyway not be done. opw-697151 note: this change is already in 10.0 (it is inside mrp refactoring 2ddc35a53) --- addons/mrp_byproduct/mrp_byproduct.py | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/mrp_byproduct/mrp_byproduct.py b/addons/mrp_byproduct/mrp_byproduct.py index 17b3a63c458..dc99ce1c0d2 100644 --- a/addons/mrp_byproduct/mrp_byproduct.py +++ b/addons/mrp_byproduct/mrp_byproduct.py @@ -105,7 +105,6 @@ class mrp_production(osv.osv): 'product_uom': sub_product.product_uom.id, 'location_id': source, 'location_dest_id': production.location_dest_id.id, - 'move_dest_id': production.move_prod_id.id, 'production_id': production.id } move_id = move_obj.create(cr, uid, data, context=context)