From 026849832a0d7850d1f0ed03ed7dad3e1d433395 Mon Sep 17 00:00:00 2001 From: "Quentin (OpenERP)" Date: Wed, 2 May 2012 18:56:39 +0200 Subject: [PATCH] [IMP] stock: incomming shipments are always set as available bzr revid: qdp-launchpad@openerp.com-20120502165639-dt3stdub0zt52bgs --- addons/stock/stock.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index 64296e2882c..57e12c7f0b8 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -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):