[FIX] stock: reserved quantity computation error

bzr revid: qdp-launchpad@openerp.com-20140401122854-gpl2uez5xt09gyfe
This commit is contained in:
Quentin (OpenERP) 2014-04-01 14:28:54 +02:00
parent e6249680c1
commit 0274397d4a
1 changed files with 1 additions and 0 deletions

View File

@ -2124,6 +2124,7 @@ 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=[], fallback_domain=[], 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:
move.refresh()
#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