bug fix on stock

bzr revid: mra@tinyerp.com-20081105092504-jezr3lb9bx4ii9xe
This commit is contained in:
Mustufa Rangwala
2008-11-05 14:55:04 +05:30
parent 78cd1bc850
commit 74f4f831dd
+4 -3
View File
@@ -428,7 +428,7 @@ class stock_picking(osv.osv):
for picking in self.browse(cr, uid, ids):
for r in picking.move_lines:
if r.state=='draft':
todo.append(r)
todo.append(r.id)
todo = self.action_explode(cr, uid, todo, context)
if len(todo):
self.pool.get('stock.move').action_confirm(cr, uid, todo, context)
@@ -985,8 +985,9 @@ class stock_move(osv.osv):
result[m.picking_id].append( (m, dest) )
return result
def action_confirm(self, cr, uid, moves, context={}):
ids = map(lambda m: m.id, moves)
def action_confirm(self, cr, uid, ids, context={}):
# ids = map(lambda m: m.id, moves)
moves = self.browse(cr, uid, ids)
self.write(cr, uid, ids, {'state':'confirmed'})
for picking, todo in self._chain_compute(cr, uid, moves, context).items():
ptype = self.pool.get('stock.location').picking_type_get(cr, uid, todo[0][0].location_dest_id, todo[0][1][0])