From 4a7b383527cee221510d5ffd9fe90e0679d8242c Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Wed, 27 May 2015 15:13:57 +0200 Subject: [PATCH] [FIX] stock: method do_prepare_partial takes into account moves in state 'waiting' When scrapping received products, the state of the move will be switched back from 'assigned' to 'waiting' in method 'recalculate_move_state'. These moves must be taken into account in 'do_prepare_partial', which is called when clicking on 'Transfer'. Note that this bug would only appear if: - reception in 2 steps is set - the products are received without scrapping in the first step - on the second step, we first scrap, then transfer. If we transfer, cancel, scrap and transfer, it works since the pack_operation_ids have been calculated correctly during the first click on 'Transfer'. opw-640415 --- addons/stock/stock.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index d560edc18c8..215dc25267c 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1163,7 +1163,7 @@ class stock_picking(osv.osv): picking_quants = [] #Calculate packages, reserved quants, qtys of this picking's moves for move in picking.move_lines: - if move.state not in ('assigned', 'confirmed'): + if move.state not in ('assigned', 'confirmed', 'waiting'): continue move_quants = move.reserved_quant_ids picking_quants += move_quants