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-26 11:22:18 +0200
committerAaron Bohy <aab@odoo.com>2017-05-26 15:15:59 +0200
commitd76dc17a980a05661c9c15c89785b7485482805d (patch)
treebb5ac9a5538e3b45dc839edb9f9959269596a2dc /addons/web/static/src/js/views/pivot/pivot_controller.js
parentf72bc6c9bed2d22d3e9b980b6c50f1d5a48ce9fd (diff)
[FIX] web: Pivot: make expand all actually work
The 'Expand All' feature was tested, but in the test environment RPCs are mocked, and everything is synchronous (by default). So even if the tests passed, the feature actually didn't work because of a deferred (the reload deferred) that wasn't waited for.
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.js5
1 files changed, 3 insertions, 2 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 3902599e55c..fb175aa1934 100644
--- a/addons/web/static/src/js/views/pivot/pivot_controller.js
+++ b/addons/web/static/src/js/views/pivot/pivot_controller.js
@@ -220,8 +220,9 @@ var PivotController = AbstractController.extend({
this.update({}, {reload: false});
}
if ($target.hasClass('o_pivot_expand_button')) {
- this.model.expandAll();
- this.update({}, {reload: false});
+ this.model
+ .expandAll()
+ .then(this.update.bind(this, {}, {reload: false}));
}
if ($target.parents('.o_pivot_measures_list').length) {
var parent = $target.parent();