[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 in8c307d7b1a 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 refactoring2ddc35a53)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user