summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_model.js
diff options
context:
space:
mode:
authorJulien Castiaux <juc@odoo.com>2019-04-18 07:24:06 +0000
committerJulien Castiaux <juc@odoo.com>2019-05-02 07:30:02 +0000
commit4ae4aed2546419e430c1e59a048084686ec03941 (patch)
tree842964a5b6ba09e51535f9b0ea5dc0a2fdd36fdd /addons/web/static/src/js/views/basic/basic_model.js
parente373f55d4919633b63af1362c2d918c17a74d998 (diff)
[FIX] web: load binary data in separate http req
The `read` done by `_fetchRecord` in `basic_model.js` expicitly set a `bin_size: true` in the context. That context option tells the backend to send the size of the binary payload instead of the payload itself thus slim the response size. Frontend widgets are then responsible to fetch the actual payload in a separated http req. The `search_read` done by `_searchReadUngroupedList` didn't set the context option thus all the binary fields were sent b64 encoded along with the `search_read` response. opw-1963842 closes odoo/odoo#33014 Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_model.js')
-rw-r--r--addons/web/static/src/js/views/basic/basic_model.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/views/basic/basic_model.js b/addons/web/static/src/js/views/basic/basic_model.js
index 804e6d6d1c9..a79fabd48d6 100644
--- a/addons/web/static/src/js/views/basic/basic_model.js
+++ b/addons/web/static/src/js/views/basic/basic_model.js
@@ -4572,7 +4572,7 @@ var BasicModel = AbstractModel.extend({
route: '/web/dataset/search_read',
model: list.model,
fields: fieldNames,
- context: list.getContext(),
+ context: _.extend({}, list.getContext(), {bin_size: true}),
domain: list.domain || [],
limit: list.limit,
offset: list.loadMoreOffset + list.offset,