From 2be28d4d033b5930e5a16ff02407315a116e9043 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Wed, 13 Mar 2019 15:42:52 +0000 Subject: [IMP] web,board: enable pagination in grouped lists With this rev., when there are a lot of groups in a grouped list view, groups are displayed under several pages, whereas they were all displayed in the same page before. This is especially interesting with the new 'expand' attribute, to ensure that we don't read records for a large number of groups. By default, the groups limit is set to 80 (like records), and to 10 is the 'expand' attribute is set to true. This limit can be overriden with the 'groups_limit' attribute. Part of task 1915702 --- addons/web/static/tests/views/basic_model_tests.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'addons/web/static/tests/views/basic_model_tests.js') diff --git a/addons/web/static/tests/views/basic_model_tests.js b/addons/web/static/tests/views/basic_model_tests.js index 2a9fbec6bd4..d840210d4ff 100644 --- a/addons/web/static/tests/views/basic_model_tests.js +++ b/addons/web/static/tests/views/basic_model_tests.js @@ -917,14 +917,14 @@ odoo.define('web.basic_model_tests', function (require) { Model: BasicModel, data: this.data, mockRPC: function (route, args) { - if (args.method === 'read_group' && filterEnabled) { + if (args.method === 'web_read_group' && filterEnabled) { // as this is not yet supported by the MockServer, simulates // a read_group that returns empty groups // this is the case for several models (e.g. project.task // grouped by stage_id) return this._super.apply(this, arguments).then(function (result) { // artificially filter out records of first group - result[0].product_id_count = 0; + result.groups[0].product_id_count = 0; return result; }); } @@ -982,7 +982,7 @@ odoo.define('web.basic_model_tests', function (require) { Model: BasicModel, data: this.data, mockRPC: function (route, args) { - if (args.method === 'read_group') { + if (args.method === 'web_read_group') { assert.deepEqual(args.kwargs.fields, ['foo', 'date'], "should have correctly trimmed the magic grouping info from the field name"); } -- cgit v1.2.3