From 6b316a3000582e95c95ae4c4189c069fc4a4233d Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Fri, 20 Dec 2013 11:12:21 +0100 Subject: [PATCH] [FIX] stock: refresh the move on which the remaining qty has juste changed to avoid using a wrong remaining_qty for it on the next pack operation bzr revid: qdp-launchpad@openerp.com-20131220101221-44ymtm1cdaxnbgqt --- addons/stock/stock.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 2d8df49b40c..de04788aaf2 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1011,6 +1011,7 @@ class stock_picking(osv.osv): qty_on_link = min(move.remaining_qty, qty_to_assign) link_obj.create(cr, uid, {'move_id': move.id, 'operation_id': op.id, 'qty': qty_on_link}, context=context) qty_to_assign -= qty_on_link + move.refresh() if qty_to_assign <= 0: break