diff --git a/addons/stock_account/wizard/stock_valuation_history.py b/addons/stock_account/wizard/stock_valuation_history.py index 71ff9950a2d..5fc94f8106f 100644 --- a/addons/stock_account/wizard/stock_valuation_history.py +++ b/addons/stock_account/wizard/stock_valuation_history.py @@ -50,7 +50,7 @@ class stock_history(osv.osv): if 'inventory_value' in fields: group_lines = {} for line in res: - domain = line.get('__domain', []) + domain = line.get('__domain', domain) group_lines.setdefault(str(domain), self.search(cr, uid, domain, context=context)) line_ids = set() for ids in group_lines.values(): @@ -75,7 +75,7 @@ class stock_history(osv.osv): histories_dict[(history['product_template_id'], history['company_id'])] = history['cost'] for line in res: inv_value = 0.0 - lines = group_lines.get(str(line.get('__domain', []))) + lines = group_lines.get(str(line.get('__domain', domain))) for line_id in lines: line_rec = lines_dict[line_id] product = products_dict[line_rec['product_id']]