From 6a30d52a6f0076a43b0680b1ef9a03e600a05e8a Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Tue, 30 Jul 2013 09:54:38 +0200 Subject: [PATCH] [FIX] YAML Tests passes bzr revid: fp@tinyerp.com-20130730075438-527l8ckq2lfhk1nv --- addons/stock/stock.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/addons/stock/stock.py b/addons/stock/stock.py index c4a552f173f..8606ee4f76c 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -1097,9 +1097,7 @@ class stock_move(osv.osv): return {'value': result} def _picking_assign(self, cr, uid, move, context=None): - if move.picking_id or \ - move.location_id.usage in ['production', 'inventory'] or \ - move.location_dest_id.usage in ['production', 'inventory']: + if move.picking_id or not move.picking_type_id: return False context = context or {} pick_obj = self.pool.get("stock.picking") @@ -1149,10 +1147,8 @@ class stock_move(osv.osv): if m.state not in ('done', 'cancel'): state = 'waiting' states[state].append(move.id) - self._picking_assign(cr, uid, move, context=context) - for state, write_ids in states.items(): if len(write_ids): self.write(cr, uid, write_ids, {'state': state})