[FIX] mrp: chain product move and MO locations
authorJulien Legros <jle@odoo.com>
Tue, 4 Nov 2014 17:07:59 +0000 (18:07 +0100)
committerJulien Legros <jle@odoo.com>
Wed, 5 Nov 2014 11:44:02 +0000 (12:44 +0100)
commit61a8971db510dbb0e087bba09858fe8b94c7b16d
tree6df5ae6cc3f75b2d6464069aa2030bb7da14f3a0
parent9a37e5a59a6ff566ba11ceb454fe5a8df19b4d53
[FIX] mrp: chain product move and MO locations

When validating a SO containing a `make to stock` + `manufacture` product
(with bom + orderpoint), we have the following stock moves:
* Product move
* Manufacturing order
Selling 1 such product would yield 2 as incoming quantity, an
inconsistency that this commit solves by setting the location_id of the
product move to the MO's location_dest_id (in the same fashion that
the create_pickings method does in an mts/buy case)

opw-616229
addons/mrp/mrp.py