[FIX] purchase_requisition: duplicated stock moves
authorDenis Ledoux <dle@odoo.com>
Wed, 25 Jun 2014 10:00:14 +0000 (12:00 +0200)
committerDenis Ledoux <dle@odoo.com>
Wed, 25 Jun 2014 10:00:14 +0000 (12:00 +0200)
commitdee969929a000e069b1d2bf2d3e362ae7aed6d9e
tree084e2ecb06026d2183463762e2a0fdde79439988
parent4bfcbb2a480db6b72b6db84420a39dcf641bbbb1
[FIX] purchase_requisition: duplicated stock moves

When a purchase requisition is created from a procurement order, a first stock move is created, not associated to any purchase orders
Then, on purchase order creation and confirmation, in the purchase requisition, new stock moves are created, associated to the purchase order.
The existing stock move issued from the procurement order which created the purchase requisition remained untouched, leading to wrong inventory values
To fix this, the destination location of the stock move of the procurement order is written on the source location
A proper fix should be to use a dedicated workflow for puchase requisition, but this can't be done in 7.0, it has to be done in master/trunk
addons/purchase_requisition/purchase_requisition.py