[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)
This commit is contained in:
Nicolas Lempereur 2017-02-01 14:46:04 +01:00
parent e0222de3c2
commit e3232c85b9
1 changed files with 0 additions and 1 deletions

View File

@ -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)