[IMP] stock: incomming shipments are always set as available

bzr revid: qdp-launchpad@openerp.com-20120502165639-dt3stdub0zt52bgs
This commit is contained in:
Quentin (OpenERP) 2012-05-02 18:56:39 +02:00
parent d56e9f031a
commit 026849832a
1 changed files with 2 additions and 4 deletions

View File

@ -893,11 +893,9 @@ class stock_picking(osv.osv):
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':
if move.state == 'waiting':
return False
if move.product_id.type == 'consu' or move.location_id.usage == 'supplier':
return True
return True
if (move.state in ('confirmed', 'draft')) and (mt == 'one'):
return False
if (mt == 'direct') and (move.state == 'assigned') and (move.product_qty):