summaryrefslogtreecommitdiff
path: root/addons
diff options
context:
space:
mode:
authorJay Vora (OpenERP) <jvo@tinyerp.com>2011-03-07 15:22:46 +0530
committerJay Vora (OpenERP) <jvo@tinyerp.com>2011-03-07 15:22:46 +0530
commit05fab9dcceff8d88624cb5a3b08d09c3fa623f70 (patch)
treeb53f4831c087d96a58e64db40151d83ae0469f26 /addons
parentab69f51931a25af9f9d8d155835d49dcdb222b42 (diff)
[FIX] Stock : Call to write() with integer format of IDS can cause crash on system,normally write should be called with [IDS] format(Ref : Maintenance case 4416)
bzr revid: jvo@tinyerp.com-20110307095246-32l3ele6e7n2e9fo
Diffstat (limited to 'addons')
-rw-r--r--addons/stock/stock.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index c942818a3d4..dd7861a8520 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -1250,7 +1250,7 @@ class stock_picking(osv.osv):
move_obj.write(cr, uid, [c.id for c in complete], {'picking_id': new_picking})
for move in complete:
if prodlot_ids.get(move.id):
- move_obj.write(cr, uid, move.id, {'prodlot_id': prodlot_ids[move.id]})
+ move_obj.write(cr, uid, [move.id], {'prodlot_id': prodlot_ids[move.id]})
for move in too_many:
product_qty = move_product_qty[move.id]
defaults = {
@@ -1823,7 +1823,7 @@ class stock_move(osv.osv):
old_ptype = location_obj.picking_type_get(cr, uid, picking.move_lines[0].location_id, picking.move_lines[0].location_dest_id)
if old_ptype != picking.type:
old_pick_name = seq_obj.get(cr, uid, 'stock.picking.' + old_ptype)
- self.pool.get('stock.picking').write(cr, uid, picking.id, {'name': old_pick_name}, context=context)
+ self.pool.get('stock.picking').write(cr, uid, [picking.id], {'name': old_pick_name}, context=context)
else:
pickid = False
for move, (loc, dummy, delay, dummy, company_id, ptype) in todo:
@@ -2467,7 +2467,7 @@ class stock_move(osv.osv):
defaults.update(prodlot_id=prodlot_id)
new_move = self.copy(cr, uid, move.id, defaults)
complete.append(self.browse(cr, uid, new_move))
- self.write(cr, uid, move.id,
+ self.write(cr, uid, [move.id],
{
'product_qty' : move.product_qty - product_qty,
'product_uos_qty':move.product_qty - product_qty,
@@ -2475,7 +2475,7 @@ class stock_move(osv.osv):
for move in too_many:
- self.write(cr, uid, move.id,
+ self.write(cr, uid, [move.id],
{
'product_qty': move.product_qty,
'product_uos_qty': move.product_qty,