-
- Downloads
[FIX] web: deal wih `default_order` attribute
One could set the attribute `default_order` in the view arch (like 'name,id desc'). The records should then be sorted accordingly. This feature was not implemented in the new views. This attribute should work on both basic views and embedded views (x2many). The former uses the `sort` argument in `search_read` while the latter is sorted client-side. There is however a potential issue with the latter: as the order is done client-side with records received by the server, if there are more records than the limit, the server will send records without any order. The client side order will thus be done on a fraction of the records.
Showing
- addons/web/static/src/js/services/data_manager.js 12 additions, 0 deletionsaddons/web/static/src/js/services/data_manager.js
- addons/web/static/src/js/views/abstract_view.js 11 additions, 0 deletionsaddons/web/static/src/js/views/abstract_view.js
- addons/web/static/src/js/views/basic/basic_model.js 2 additions, 1 deletionaddons/web/static/src/js/views/basic/basic_model.js
- addons/web/static/tests/views/form_tests.js 28 additions, 0 deletionsaddons/web/static/tests/views/form_tests.js
- addons/web/static/tests/views/list_tests.js 25 additions, 0 deletionsaddons/web/static/tests/views/list_tests.js
Loading
Please register or sign in to comment