From 85cf47fc92629b2baa4e04dd08da6eabac3c9cba Mon Sep 17 00:00:00 2001 From: Florian Gilbert Date: Thu, 26 Sep 2019 12:43:44 +0000 Subject: [PATCH] [FIX] Web controllers: quick fix for just keep number in aggregated_values --- addons/web/controllers/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 355ce5a9418..ade8e40a270 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -646,6 +646,11 @@ class GroupsTreeNode: count = group.pop('__count') aggregated_values = group + keys = list(aggregated_values) + for key in keys: + if not isinstance(aggregated_values[key], (int, float)): + del aggregated_values[key] + records = self._model.search(domain, offset=0, limit=False, order=False) # Follow the path from the top level group to the deepest