diff options
| author | Aaron Bohy <aab@odoo.com> | 2019-03-13 15:42:52 +0000 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2019-04-02 11:55:57 +0000 |
| commit | 2be28d4d033b5930e5a16ff02407315a116e9043 (patch) | |
| tree | 0561dbbf8c127d0aea94c6766c6815fe1d1f2d83 /addons/web/static/tests/views/view_dialogs_tests.js | |
| parent | 5895d23cbd26beb3bc3c83cc760b3cdbb64b0e85 (diff) | |
[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
Diffstat (limited to 'addons/web/static/tests/views/view_dialogs_tests.js')
| -rw-r--r-- | addons/web/static/tests/views/view_dialogs_tests.js | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/addons/web/static/tests/views/view_dialogs_tests.js b/addons/web/static/tests/views/view_dialogs_tests.js index b17112c8978..9dd78f3b724 100644 --- a/addons/web/static/tests/views/view_dialogs_tests.js +++ b/addons/web/static/tests/views/view_dialogs_tests.js @@ -146,22 +146,23 @@ QUnit.module('Views', { '</search>', }, mockRPC: function (route, args) { - if (args.method === 'read_group') { + if (args.method === 'web_read_group') { assert.deepEqual(args.kwargs, { context: {}, - domain: [["display_name","like","a"], "&", ["display_name","ilike","piou"], ["foo","ilike","piou"]], - fields: ["display_name","foo","bar"], + domain: [["display_name", "like", "a"], "&", ["display_name", "ilike", "piou"], ["foo", "ilike", "piou"]], + fields: ["display_name", "foo", "bar"], groupby: ["bar"], orderby: '', - lazy: true + lazy: true, + limit: 80, }, "should search with the complete domain (domain + search), and group by 'bar'"); } if (search === 0 && route === '/web/dataset/search_read') { search++; assert.deepEqual(args, { context: {}, - domain: [["display_name","like","a"], "&", ["display_name","ilike","piou"], ["foo","ilike","piou"]], - fields: ["display_name","foo"], + domain: [["display_name", "like", "a"], "&", ["display_name", "ilike", "piou"], ["foo", "ilike", "piou"]], + fields: ["display_name", "foo"], model: "partner", limit: 80, sort: "" @@ -169,8 +170,8 @@ QUnit.module('Views', { } else if (search === 1 && route === '/web/dataset/search_read') { assert.deepEqual(args, { context: {}, - domain: [["display_name","like","a"]], - fields: ["display_name","foo"], + domain: [["display_name", "like", "a"]], + fields: ["display_name", "foo"], model: "partner", limit: 80, sort: "" |
