From d88dcde4f055ff3e89d4440f53ea1f36d9817b6d Mon Sep 17 00:00:00 2001 From: Carlos Lopez Date: Tue, 30 May 2017 02:12:38 -0500 Subject: [PATCH] [FIX] web: pivot view should use col_group_by and measures key For historical reasons, when the pivot view was rewritten, we lost the ability to understand the measure and col_group_by keys from the context. It was actually a deliberate decision, because we decided that it was not possible to properly handle the colgroupbys in the search views, so we replaced that mechanism with pivot_col_group_by and pivot_measures keys exported by the view, when necessary. Sadly, we did not properly remove the outdated keys from the xml files. So, with this commit, we reintroduce those special keys, because 10.0 is a stable version. Note that this will be removed in master. (PR 17119) --- addons/web/static/src/js/views/pivot_view.js | 4 ++-- doc/cla/individual/celm1990.md | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 doc/cla/individual/celm1990.md diff --git a/addons/web/static/src/js/views/pivot_view.js b/addons/web/static/src/js/views/pivot_view.js index cb9e4b8d02b..c874a87665f 100644 --- a/addons/web/static/src/js/views/pivot_view.js +++ b/addons/web/static/src/js/views/pivot_view.js @@ -188,8 +188,8 @@ var PivotView = View.extend({ this.initial_col_groupby = context.pivot_col_groupby || this.initial_col_groupby; } this.main_row.groupbys = group_by.length ? group_by : (context.pivot_row_groupby || this.initial_row_groupby.slice(0)); - this.main_col.groupbys = context.pivot_column_groupby || this.initial_col_groupby.slice(0); - this.active_measures = context.pivot_measures || this.active_measures; + this.main_col.groupbys = context.col_group_by || context.pivot_column_groupby || this.initial_col_groupby.slice(0); + this.active_measures = context.measures || context.pivot_measures || this.active_measures; this.domain = domain; this.context = context; diff --git a/doc/cla/individual/celm1990.md b/doc/cla/individual/celm1990.md new file mode 100644 index 00000000000..245c0e93869 --- /dev/null +++ b/doc/cla/individual/celm1990.md @@ -0,0 +1,11 @@ +Ecuador, 2017-05-19 + +I hereby agree to the terms of the Odoo Individual Contributor License +Agreement v1.0. + +I declare that I am authorized and able to make this agreement and sign this +declaration. + +Signed, + +Carlos Lopez celm1990@hotmail.com https://github.com/celm1990