[FIX] stock, fixing the runbot: incomming shipments are always set as available ONLY if they aren't chained and waiting for another move to be processed
bzr revid: qdp-launchpad@openerp.com-20120503121253-07u62yctdl42epie
This commit is contained in:
@@ -892,10 +892,11 @@ class stock_picking(osv.osv):
|
||||
ok = True
|
||||
for pick in self.browse(cr, uid, ids):
|
||||
mt = pick.move_type
|
||||
for move in pick.move_lines:
|
||||
# incomming shipments are always set as available
|
||||
if pick.type == 'in':
|
||||
# incomming shipments are always set as available if they aren't chained
|
||||
if pick.type == 'in':
|
||||
if all([x.state != 'waiting' for x in pick.move_lines]):
|
||||
return True
|
||||
for move in pick.move_lines:
|
||||
if (move.state in ('confirmed', 'draft')) and (mt == 'one'):
|
||||
return False
|
||||
if (mt == 'direct') and (move.state == 'assigned') and (move.product_qty):
|
||||
|
||||
Reference in New Issue
Block a user