From ee0caa2465192008f254d7faf2253b84a76cb150 Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Thu, 3 Sep 2015 10:54:07 +0200 Subject: [PATCH] [FIX] web: pivot groupby by field from inherits A related field used in a group by (filter with group_by in context) which isn't stored on the model, but stored in the related model should be allowed to be grouped by uppon on a pivot view. In 8.0 it wasn't the case, but when adding it as a it was added in the list of fields. In saas-6 these group by are only available in the search view, but in some instance (the field is not stored directly on the model) this could lead to an error which is fixed by this commit. closes #8349 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 64f86fbfbcd..0d39661fca8 100644 --- a/addons/web/static/src/js/view_pivot.js +++ b/addons/web/static/src/js/view_pivot.js @@ -601,7 +601,7 @@ instance.web.PivotView = instance.web.View.extend({ display_total = this.main_col.width > 1; var groupby_labels = _.map(this.main_row.groupbys, function (gb) { - return self.groupable_fields[gb.split(':')[0]].string; + return self.fields[gb.split(':')[0]].string; }); var measure_types = this.active_measures.map(function (name) { return self.measures[name].type;