From 4ae4aed2546419e430c1e59a048084686ec03941 Mon Sep 17 00:00:00 2001 From: Julien Castiaux Date: Thu, 18 Apr 2019 07:24:06 +0000 Subject: [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) --- addons/web/static/src/js/views/basic/basic_model.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web/static/src/js/views/basic/basic_model.js') 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, -- cgit v1.2.3