[FIX] YAML Tests passes

bzr revid: fp@tinyerp.com-20130730075438-527l8ckq2lfhk1nv
This commit is contained in:
Fabien Pinckaers
2013-07-30 09:54:38 +02:00
parent bf7f51ecaa
commit 6a30d52a6f
+1 -5
View File
@@ -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})