[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)
This commit is contained in:
Carlos Lopez
2017-05-30 09:12:38 +02:00
committed by ged-odoo
parent 0857c65515
commit d88dcde4f0
2 changed files with 13 additions and 2 deletions
+2 -2
View File
@@ -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;
+11
View File
@@ -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