From 744d41fd2bcba7450a33a748b88b07127b585e8a Mon Sep 17 00:00:00 2001 From: Raphael Collet Date: Wed, 8 Feb 2012 12:29:46 +0100 Subject: [PATCH] [FIX] revert commit 6513, as it breaks the tests bzr revid: rco@openerp.com-20120208112946-purvqw5o807p0eek --- addons/stock/stock.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index e05428f8c17..9b4644c1161 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2452,12 +2452,14 @@ class stock_move(osv.osv): quantity = move.product_qty uos_qty = quantity / move_qty * move.product_uos_qty + location_dest_id = move.product_id.property_stock_production or move.location_dest_id if quantity_rest > 0: default_val = { 'product_qty': quantity, 'product_uos_qty': uos_qty, 'state': move.state, 'location_id': location_id or move.location_id.id, + 'location_dest_id': location_dest_id.id, } current_move = self.copy(cr, uid, move.id, default_val) res += [current_move] @@ -2474,6 +2476,7 @@ class stock_move(osv.osv): 'product_qty' : quantity_rest, 'product_uos_qty' : uos_qty_rest, 'location_id': location_id or move.location_id.id, + 'location_dest_id': location_dest_id.id, } self.write(cr, uid, [move.id], update_val)