[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
This commit is contained in:
Quentin (OpenERP) 2013-12-20 11:12:21 +01:00
parent 16230f2653
commit 6b316a3000
1 changed files with 1 additions and 0 deletions

View File

@ -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