From cf53d5cd724d4ea7f051e9ea11fee10dad402ccd Mon Sep 17 00:00:00 2001 From: "sbh (Open ERP)" Date: Wed, 22 Sep 2010 12:24:59 +0530 Subject: [PATCH] [Fix] stock: stock_move_do_partial to properly set the production lot bzr revid: sbh@tinyerp.com-20100922065459-dzp65m06jiomu4rp --- addons/stock/stock.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index c5784541f68..209492c8bb9 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2284,8 +2284,6 @@ class stock_move(osv.osv): product_price = partial_data.get('product_price',0.0) product_currency = partial_data.get('product_currency',False) prodlot_id = partial_data.get('prodlot_id',False) - if prodlot_id: - self.write(cr, uid, [move.id],{'prodlot_id': prodlot_id,}) if move.product_qty == product_qty: complete.append(move) elif move.product_qty > product_qty: @@ -2354,6 +2352,8 @@ class stock_move(osv.osv): complete.append(move) for move in complete: + if prodlot_id: + self.write(cr, uid, [move.id],{'prodlot_id': prodlot_id,}) self.action_done(cr, uid, [move.id], context=context) if move.picking_id.id : # TOCHECK : Done picking if all moves are done