diff options
| author | Alexandre Kühn <alex.e.kuhn@gmail.com> | 2018-01-14 21:34:13 +0100 |
|---|---|---|
| committer | Alexandre Kühn <alex.e.kuhn@gmail.com> | 2018-01-15 10:03:14 +0100 |
| commit | 2a5488619da22cfd901963dd141e722b195e82ab (patch) | |
| tree | 79c2d7ce5b5a332c63badab2be0fc9974fb1b362 /addons/web/static/tests/fields/relational_fields_tests.js | |
| parent | 2a244e3e669c85a4a953b3e668c0545bfe658edd (diff) | |
[FIX] web: disable {bin_size: true} on binary fields
Revision on 41fe7f9d1113d026b226b136b4477aaaf9f1f638
This commit intended to reduce the network load when reading records with
binary fields. This was made possible by enforcing the contextual key
`bin_size` to be set for records with binary fields.
However, it is causing some issues (see #22222, #22231) which are:
- write with bin_size:true generates a traceback
- read/search_read with bin_size:true breaks some images
on some views (e.g. base.view_partner_form)
Since the problems outweight the gain of these changes, we revert them.
Diffstat (limited to 'addons/web/static/tests/fields/relational_fields_tests.js')
| -rw-r--r-- | addons/web/static/tests/fields/relational_fields_tests.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/addons/web/static/tests/fields/relational_fields_tests.js b/addons/web/static/tests/fields/relational_fields_tests.js index 374912169e6..2eab2b421b5 100644 --- a/addons/web/static/tests/fields/relational_fields_tests.js +++ b/addons/web/static/tests/fields/relational_fields_tests.js @@ -6916,6 +6916,7 @@ QUnit.module('relational_fields', { if (args.method === 'read' && args.model === 'partner') { assert.deepEqual(args.kwargs.context, { active_field: 2, + bin_size: true, someKey: 'some value', }, "sent context should be correct"); } @@ -9250,7 +9251,7 @@ QUnit.module('relational_fields', { '</tree>', mockRPC: function (route, args) { if (args.method === 'read' && args.model === 'partner_type') { - assert.deepEqual(args.kwargs.context, {take: 'five'}, + assert.deepEqual(args.kwargs.context.take, 'five', 'The context should be passed to the RPC'); } return this._super.apply(this, arguments); |
