[FIX] stock_account: do not sum price unit

The view yields one line per stock move, with a price/unit on each line.
It doesn't make sense to sum price/units, the avg will be only meaningful when
grouping per product but it's correct in the default state.

Closes #11309
This commit is contained in:
Lionel Sausin 2016-03-11 17:58:36 +01:00 committed by Martin Trigaux
parent 77de330c03
commit 5537c5a13c
No known key found for this signature in database
GPG Key ID: 7B0E288E7C0F83A7
1 changed files with 1 additions and 1 deletions

View File

@ -108,7 +108,7 @@ class stock_history(osv.osv):
'product_categ_id': fields.many2one('product.category', 'Product Category', required=True),
'quantity': fields.float('Product Quantity'),
'date': fields.datetime('Operation Date'),
'price_unit_on_quant': fields.float('Value'),
'price_unit_on_quant': fields.float('Value', group_operator='avg'),
'inventory_value': fields.function(_get_inventory_value, string="Inventory Value", type='float', readonly=True),
'source': fields.char('Source')
}