From 5a1ea01d8a00877b552e5968d8e9a8446ad9f015 Mon Sep 17 00:00:00 2001 From: Jigar Patel Date: Wed, 7 Jan 2015 11:58:41 +0530 Subject: [PATCH] [IMP] web: Sort fields --- addons/web/static/src/js/view_pivot.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/static/src/js/view_pivot.js b/addons/web/static/src/js/view_pivot.js index ed0b65c9702..c76893a4938 100644 --- a/addons/web/static/src/js/view_pivot.js +++ b/addons/web/static/src/js/view_pivot.js @@ -87,7 +87,7 @@ instance.web.PivotView = instance.web.View.extend({ self.$buttons.find('li[data-field="' + measure + '"]').addClass('selected'); }); - var another_ctx = {fields: _.pairs(this.groupable_fields)}; + var another_ctx = {fields: _.chain(this.groupable_fields).pairs().sortBy(function(f){return f[1].string;}).value()}; this.$field_selection = this.$('.o-field-selection'); this.$field_selection.html(QWeb.render('PivotView.FieldSelection', another_ctx)); openerp.web.bus.on('click', self, function () {