diff options
| author | Mathieu Duckerts-Antoine <dam@odoo.com> | 2018-11-05 13:17:46 +0000 |
|---|---|---|
| committer | Mathieu Duckerts-Antoine <dam@odoo.com> | 2018-12-18 12:56:06 +0000 |
| commit | 7618f84beb3e3252f0e62de0650d4bcb33398b29 (patch) | |
| tree | d81161af3f636928e76fb6b9b6b2814d5f2ad3dd /addons/web/static/src/js/views/pivot/pivot_controller.js | |
| parent | c7a307ffd2fb3dc1e2318a330a8d904613080675 (diff) | |
[FIX] web: sort pivot rows in comparison mode
Before this commit, it was not possible to sort
the rows of a pivot view while in comparison
mode. This fix makes it now possible. Note that
in comparison mode, a click on a header of type
"measure" will sort the rows according to the
column values coming from the data of interest.
closes odoo/odoo#28411
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.js | 3 |
1 files changed, 2 insertions, 1 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 48b5fb033fa..a573a6fa4cb 100644 --- a/addons/web/static/src/js/views/pivot/pivot_controller.js +++ b/addons/web/static/src/js/views/pivot/pivot_controller.js @@ -336,7 +336,8 @@ var PivotController = AbstractController.extend({ var col_id = $target.data('id'); var measure = $target.data('measure'); var isAscending = $target.hasClass('o_pivot_measure_row_sorted_asc'); - this.model.sortRows(col_id, measure, isAscending); + var dataType = $target.data('data_type'); + this.model.sortRows(col_id, measure, isAscending, dataType); this.update({}, {reload: false}); }, /** |
