summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarry (OpenERP) <hmo@tinyerp.com>2010-12-15 13:26:48 +0530
committerHarry (OpenERP) <hmo@tinyerp.com>2010-12-15 13:26:48 +0530
commit516dc572c4e8daaa51ff9fd0cf59018683f83079 (patch)
tree103a95ebc3fe60e9748fbfcd7a3b877aa7e5ecae
parent9b10499abe91affdd2f32cda5704737327cbed73 (diff)
[FIX] openerp-buildfail-1-4433: use orm method instead of sql query in action_done of stock.move object in stock module
bzr revid: hmo@tinyerp.com-20101215075648-v709es1gkjiqqio8
-rw-r--r--addons/stock/stock.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/stock/stock.py b/addons/stock/stock.py
index 3a441f32ee4..c67262458f1 100644
--- a/addons/stock/stock.py
+++ b/addons/stock/stock.py
@@ -2038,7 +2038,8 @@ class stock_move(osv.osv):
if move.picking_id:
picking_ids.append(move.picking_id.id)
if move.move_dest_id.id and (move.state != 'done'):
- cr.execute('insert into stock_move_history_ids (parent_id,child_id) values (%s,%s)', (move.id, move.move_dest_id.id))
+ self.write(cr, uid, [move.id], {'move_history_ids': [(4, move.move_dest_id.id)]})
+ #cr.execute('insert into stock_move_history_ids (parent_id,child_id) values (%s,%s)', (move.id, move.move_dest_id.id))
if move.move_dest_id.state in ('waiting', 'confirmed'):
self.write(cr, uid, [move.move_dest_id.id], {'state': 'assigned'})
if move.move_dest_id.picking_id: