[FIX] receive and manually create a new one

bzr revid: fp@tinyerp.com-20110925232056-9t1lz4wf6t3ufjyz
This commit is contained in:
Fabien Pinckaers 2011-09-26 01:20:56 +02:00
parent b8140d9138
commit 371366702b
1 changed files with 5 additions and 1 deletions

View File

@ -848,7 +848,11 @@ class stock_picking(osv.osv):
for pick in self.browse(cr, uid, ids, context=context):
todo = []
for move in pick.move_lines:
if move.state == 'assigned':
if move.state == 'draft':
self.pool.get('stock.move').action_confirm(cr, uid, [move.id],
context=context)
todo.append(move.id)
elif move.state in ('assigned','confirmed'):
todo.append(move.id)
if len(todo):
self.pool.get('stock.move').action_done(cr, uid, todo,