From 1fa6b63c0f20c514901a39c551ddc683be41cfac Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Wed, 21 Feb 2018 13:14:17 +0100 Subject: [PATCH] [FIX] stock_account: groupby Set the groupby according to what is done in `_read_group_raw`. opw-816358 --- addons/stock_account/report/stock_history.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/stock_account/report/stock_history.py b/addons/stock_account/report/stock_history.py index 02e12193203..077aea8cef5 100644 --- a/addons/stock_account/report/stock_history.py +++ b/addons/stock_account/report/stock_history.py @@ -30,7 +30,7 @@ class StockHistory(models.Model): # on the individual lines. res = super(StockHistory, self).read_group(domain, fields, groupby, offset=offset, limit=limit, orderby=orderby, lazy=lazy) if 'inventory_value' in fields: - groupby_list = groupby if not lazy else groupby[:-1] + groupby_list = groupby[:1] if lazy else groupby date = self._context.get('history_date', fieldsDatetime.now()) # Step 2: retrieve the stock history lines. The result contains the 'expanded'