From d39d191cec76a69cf63b9834e1a99aa87f8be9c4 Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Tue, 22 Mar 2016 15:32:14 +0100 Subject: [PATCH] [FIX] stock: reserve if move not assigned Commit 4a0b6f6 slightly improves the performances of `action_assign` by skipping moves which already have pack operations. However, if the move is not completely assigned, it prevents the possibility to search for new quants to assign to the given move. opw-672069 --- addons/stock/stock.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index ea8cf25beb6..f13a208e58c 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -2347,8 +2347,6 @@ class stock_move(osv.osv): quants = quant_obj.quants_get_prefered_domain(cr, uid, ops.location_id, move.product_id, qty, domain=domain, prefered_domain_list=[], restrict_lot_id=move.restrict_lot_id.id, restrict_partner_id=move.restrict_partner_id.id, context=context) quant_obj.quants_reserve(cr, uid, quants, move, record, context=context) for move in todo_moves: - if move.linked_move_operation_ids: - continue #then if the move isn't totally assigned, try to find quants without any specific domain if move.state != 'assigned': qty_already_assigned = move.reserved_availability