diff --git a/addons/stock/stock.py b/addons/stock/stock.py index b4ad96196ec..ed4ce5692ea 100644 --- a/addons/stock/stock.py +++ b/addons/stock/stock.py @@ -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])