diff options
| author | Géry Debongnie <ged@odoo.com> | 2017-02-01 11:29:17 +0100 |
|---|---|---|
| committer | Géry Debongnie <ged@odoo.com> | 2017-02-01 11:55:53 +0100 |
| commit | b8922c964cfcf836be2c1afde3cf0bb4cd817ead (patch) | |
| tree | aa372dfa51270e63cebb2522b7a573c8ecb5b43c /addons/web/static/src | |
| parent | 89c0927ce968b8abd581700086b3844d9ed34873 (diff) | |
web: pivot view properly updates measure list
Before this commit, when changing measures from the favorites menu (by
selecting a filter with some pivot_measures), the measures in the
dropdown menus were not correctly updated.
This commits make sure that we update the active measures in the menu after
each changes coming from a do_search.
Diffstat (limited to 'addons/web/static/src')
| -rw-r--r-- | addons/web/static/src/js/views/pivot_view.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/addons/web/static/src/js/views/pivot_view.js b/addons/web/static/src/js/views/pivot_view.js index a3649da9d7f..d275e122285 100644 --- a/addons/web/static/src/js/views/pivot_view.js +++ b/addons/web/static/src/js/views/pivot_view.js @@ -209,6 +209,10 @@ var PivotView = View.extend({ this.do_push_state({}); this.data_loaded.done(function () { self.display_table(); + self.$buttons.find('.o_pivot_measures_list li').removeClass('selected'); + self.active_measures.forEach(function (measure) { + self.$buttons.find('li[data-field="' + measure + '"]').addClass('selected'); + }); }); return this._super(); }, |
