From 5405883d5de088bae2b5c612f9382a176e9de127 Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Mon, 11 Aug 2014 17:21:21 +0200 Subject: [PATCH] [IMP] Location of extra moves should be matched --- addons/stock/stock.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 0618a998f03..7582d03ca85 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1333,8 +1333,9 @@ class stock_picking(osv.osv): todo_move_ids.append(move.id) #Assign move as it was assigned before toassign_move_ids.append(new_move) - if (need_rereserve or not all_op_processed) and not picking.location_id.usage in ("supplier", "production", "inventory"): - self.rereserve_quants(cr, uid, picking, move_ids=todo_move_ids, context=context) + if need_rereserve or not all_op_processed: + if not picking.location_id.usage in ("supplier", "production", "inventory"): + self.rereserve_quants(cr, uid, picking, move_ids=todo_move_ids, context=context) self.do_recompute_remaining_quantities(cr, uid, [picking.id], context=context) if todo_move_ids and not context.get('do_only_split'): self.pool.get('stock.move').action_done(cr, uid, todo_move_ids, context=context)