From bcd7273ba889b8e146355a6fbb1b16f8438efa1e Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Tue, 1 Dec 2015 14:38:09 +0100 Subject: [PATCH] [FIX] web: pivot axis switch groupby field In ee0caa246 we solved some issue when a field was used in a "group by" filter, but was not considered "groupable" (which does not resolve related field in their related model to see if they fit the bill). This was fine, but this has to be also taken into account when these group by are applied to columns, which is possible by switching x and y axis. opw-647401 --- addons/web/static/src/js/view_pivot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_pivot.js b/addons/web/static/src/js/view_pivot.js index 8dbfb3360e1..b9e3f07cb00 100644 --- a/addons/web/static/src/js/view_pivot.js +++ b/addons/web/static/src/js/view_pivot.js @@ -558,7 +558,7 @@ instance.web.PivotView = instance.web.View.extend({ display_total = this.main_col.width > 1; var groupby_labels = _.map(this.main_col.groupbys, function (gb) { - return self.groupable_fields[gb.split(':')[0]].string; + return self.fields[gb.split(':')[0]].string; }); for (i = 0; i < headers.length; i++) {