diff options
| author | svs-odoo <svs@odoo.com> | 2018-09-10 09:05:57 +0200 |
|---|---|---|
| committer | Adrien Dieudonne <adr@odoo.com> | 2018-09-26 11:14:32 +0200 |
| commit | 49136a3f031b997f959a76dbe1a210fbe0b51969 (patch) | |
| tree | 1d34e6a3848b146b6a1edb765fdaefd4b2d9ae08 /addons/web/static/src/js/views/graph | |
| parent | d39847a375165f60509dd95962071ee819d02afc (diff) | |
[FIX] web: menu items are now correctly sorted by alphabetical order
Menu items for measures list are now sorted by their 'string' value.
We set that string in lowercase because uppercase/lowercase influences
string comparison, so we are sure to compare always strings with the
same case.
This fix is effective for pivot view, cohord view and graph board.
Task #1882576
Diffstat (limited to 'addons/web/static/src/js/views/graph')
| -rw-r--r-- | addons/web/static/src/js/views/graph/graph_controller.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/graph/graph_controller.js b/addons/web/static/src/js/views/graph/graph_controller.js index b6a1c121f0f..48f15de8902 100644 --- a/addons/web/static/src/js/views/graph/graph_controller.js +++ b/addons/web/static/src/js/views/graph/graph_controller.js @@ -88,7 +88,7 @@ var GraphController = AbstractController.extend(GroupByMenuInterfaceMixin,{ renderButtons: function ($node) { if ($node) { var context = { - measures: _.sortBy(_.pairs(_.omit(this.measures, '__count__')), function (x) { return x[0]; }), + measures: _.sortBy(_.pairs(_.omit(this.measures, '__count__')), function (x) { return x[1].string.toLowerCase(); }), }; this.$buttons = $(qweb.render('GraphView.buttons', context)); this.$measureList = this.$buttons.find('.o_graph_measures_list'); |
