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