diff --git a/addons/product/product.py b/addons/product/product.py index df40b9a51e1..481a3838084 100644 --- a/addons/product/product.py +++ b/addons/product/product.py @@ -1218,6 +1218,7 @@ class product_product(osv.osv): 'company_id': company_id, }, context=context) + @api.cr_uid_ids_context def get_history_price(self, cr, uid, product_id, company_id, date=None, context=None): if context is None: context = {} diff --git a/addons/stock_account/wizard/stock_valuation_history.py b/addons/stock_account/wizard/stock_valuation_history.py index ace4a3fb0bd..3096e635bdd 100644 --- a/addons/stock_account/wizard/stock_valuation_history.py +++ b/addons/stock_account/wizard/stock_valuation_history.py @@ -97,7 +97,7 @@ class stock_history(osv.osv): if line.product_id.cost_method == 'real': res[line.id] = line.quantity * line.price_unit_on_quant else: - res[line.id] = line.quantity * product_obj.get_history_price(cr, uid, line.product_id.id, line.company_id.id, date=date, context=context) + res[line.id] = line.quantity * product_obj.get_history_price(cr, uid, [line.product_id.id], line.company_id.id, date=date, context=context) return res _columns = {