From 0305010f2ff553798102b806758974f354325112 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A9ry=20Debongnie?= Date: Fri, 26 Sep 2014 11:38:06 +0200 Subject: [PATCH] [FIX] fix context problem in graph view The group_by query expects the context to have group_by_no_leaf = true, so we can not just blindly forward the context to the groupby query. This is a defensive way to fix the problem, to avoid other possible crashes. But the context shouldn't have group_by_no_leaf anyway, it does not make sense to explicitely do that in the action --- addons/web_graph/static/src/js/graph_view.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/web_graph/static/src/js/graph_view.js b/addons/web_graph/static/src/js/graph_view.js index b4b2fb38f06..ed8711f9ac8 100644 --- a/addons/web_graph/static/src/js/graph_view.js +++ b/addons/web_graph/static/src/js/graph_view.js @@ -86,7 +86,8 @@ instance.web_graph.GraphView = instance.web.View.extend({ col_group_by = groupbys.col_group_by; if (!this.graph_widget) { - this.widget_config.context = context; + this.widget_config.context = _.clone(context); + this.widget_config.context.group_by_no_leaf = true; if (group_by.length) { this.widget_config.row_groupby = group_by; }