[FIX] stock_account: stock valuation report without result
This is related to rev. 55b7f15ee2
Prevent crash when there is no line to display
in the stock valuation report
Reporting > Warehouse > Stock Valuation.
Like when there is not yet any data, or the filter gives no result
opw-643748
This commit is contained in:
parent
49f2514a9d
commit
bdf980e4b4
|
@ -56,6 +56,8 @@ class stock_history(osv.osv):
|
|||
for product_id in ids:
|
||||
line_ids.add(product_id)
|
||||
line_ids = list(line_ids)
|
||||
lines_rec = {}
|
||||
if line_ids:
|
||||
cr.execute('SELECT id, product_id, price_unit_on_quant, company_id, quantity FROM stock_history WHERE id in %s', (tuple(line_ids),))
|
||||
lines_rec = cr.dictfetchall()
|
||||
lines_dict = dict((line['id'], line) for line in lines_rec)
|
||||
|
|
Loading…
Reference in New Issue