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.
This commit is contained in:
Géry Debongnie
2017-02-01 11:55:53 +01:00
parent 89c0927ce9
commit b8922c964c
@@ -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();
},