From 2be6a46a1fb5cfb8fceb5cb494929f79a749293d Mon Sep 17 00:00:00 2001 From: "rpa (Open ERP)" Date: Wed, 24 Nov 2010 16:20:29 +0530 Subject: [PATCH] [IMP]: stock: Pass context properly in copy of move bzr revid: rpa@tinyerp.com-20101124105029-5kbr51s9ks1w3raz --- addons/stock/wizard/stock_move.py | 3 ++- addons/stock/wizard/stock_splitinto.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/stock/wizard/stock_move.py b/addons/stock/wizard/stock_move.py index 73158b5d15e..187cd009a4d 100644 --- a/addons/stock/wizard/stock_move.py +++ b/addons/stock/wizard/stock_move.py @@ -251,7 +251,7 @@ class split_in_production_lot(osv.osv_memory): 'state': move.state } if quantity_rest > 0: - current_move = move_obj.copy(cr, uid, move.id, default_val) + current_move = move_obj.copy(cr, uid, move.id, default_val, context=context) new_move.append(current_move) if quantity_rest == 0: @@ -279,6 +279,7 @@ class split_in_production_lot(osv.osv_memory): inventory_obj.write(cr, uid, inventory_id, {'move_ids': [(4, m_id)]}, context=context) return new_move + split_in_production_lot() class stock_move_split_lines_exist(osv.osv_memory): diff --git a/addons/stock/wizard/stock_splitinto.py b/addons/stock/wizard/stock_splitinto.py index 72949695fde..26a978ef077 100644 --- a/addons/stock/wizard/stock_splitinto.py +++ b/addons/stock/wizard/stock_splitinto.py @@ -76,7 +76,7 @@ class stock_split_into(osv.osv_memory): 'state': move.state, 'product_uos': move.product_uom.id } - current_move = move_obj.copy(cr, uid, move.id, default_val) + current_move = move_obj.copy(cr, uid, move.id, default_val, context=context) new_move.append(current_move) if inventory_id and new_move: