summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/pivot/pivot_controller.js
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2017-05-24 09:55:06 +0200
committerAaron Bohy <aab@odoo.com>2017-05-26 15:15:59 +0200
commit5442769c41434dcbe890e38ae1179d7b2d009e6d (patch)
tree39f7b247a2bde11cba38498a1e221fa35f61a3f2 /addons/web/static/src/js/views/pivot/pivot_controller.js
parentb06bd6495d5159b0ee9ba257618c4fc430c22377 (diff)
[FIX] web: Pivot: correctly return context
allowing to save the current state of the pivot view in the search view, or to add it to the dashboard.
Diffstat (limited to 'addons/web/static/src/js/views/pivot/pivot_controller.js')
-rw-r--r--addons/web/static/src/js/views/pivot/pivot_controller.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/addons/web/static/src/js/views/pivot/pivot_controller.js b/addons/web/static/src/js/views/pivot/pivot_controller.js
index d6bac8020d4..ae1b372e476 100644
--- a/addons/web/static/src/js/views/pivot/pivot_controller.js
+++ b/addons/web/static/src/js/views/pivot/pivot_controller.js
@@ -74,8 +74,9 @@ var PivotController = AbstractController.extend({
//--------------------------------------------------------------------------
/**
- * We save the current measure and group bys, so we can restore the view
- * when we save the current state in the search view.
+ * Returns the current measures and groupbys, so we can restore the view
+ * when we save the current state in the search view, or when we add it to
+ * the dashboard.
*
* @override method from AbstractController
* @returns {Object}
@@ -84,8 +85,8 @@ var PivotController = AbstractController.extend({
var state = this.model.get();
return {
pivot_measures: state.measures,
- pivot_column_groupby: state.data.main_col.groupbys,
- pivot_row_groupby: state.data.main_row.groupbys,
+ pivot_column_groupby: state.colGroupBys,
+ pivot_row_groupby: state.rowGroupBys,
};
},
/**