[FIX] stock_account: compute total inventory_value when no product is specified
Without this fix, the 'Total' line of the pivot view does not display any inventory value, because there is no __domain as we are not asking the inventory value for any specific product.
This commit is contained in:
parent
88ace35fa4
commit
2d215db686
|
@ -49,8 +49,7 @@ class stock_history(osv.osv):
|
|||
prod_dict = {}
|
||||
if 'inventory_value' in fields:
|
||||
for line in res:
|
||||
if '__domain' in line:
|
||||
lines = self.search(cr, uid, line['__domain'], context=context)
|
||||
lines = self.search(cr, uid, line.get('__domain', []), context=context)
|
||||
inv_value = 0.0
|
||||
product_tmpl_obj = self.pool.get("product.template")
|
||||
lines_rec = self.browse(cr, uid, lines, context=context)
|
||||
|
|
Loading…
Reference in New Issue