From 16cccdc4beb2eda8791fed222d0c2d17b4bf9766 Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Tue, 18 Feb 2014 14:28:43 +0100 Subject: [PATCH] [FIX] When rereserving quants, make sure that in action assign he can also take into account the auto_force_assign of the picking type bzr revid: jco@openerp.com-20140218132843-kur9gg8bak1rxk1n --- addons/stock/stock.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 5c60aa33b5e..95331c1b0d0 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1899,8 +1899,10 @@ class stock_move(osv.osv): qty = move.product_qty - qty_already_assigned quants = quant_obj.quants_get_prefered_domain(cr, uid, move.location_id, move.product_id, qty, domain=main_domain[move.id], prefered_domain=prefered_domain[move.id], fallback_domain=fallback_domain[move.id], 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, context=context) + if move.state != 'assigned' and move.picking_id and move.picking_type_id.auto_force_assign: + to_assign_moves.append(move.id) - #force assignation of consumable products + #force assignation of consumable products and picking type auto_force_assign if to_assign_moves: self.force_assign(cr, uid, to_assign_moves, context=context) #check if a putaway rule is likely to be processed and store result on the move