From 41fe7f9d1113d026b226b136b4477aaaf9f1f638 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Ku=CC=88hn?= Date: Tue, 9 Jan 2018 12:04:21 +0100 Subject: [FIX] web: contexts on field widgets + enforce bin_size for binary Field widgets now have a key 'context' that let them extend the context of the dataPoint (e.g. list). In particular, widgets on binary fields enforce the contextual item {bin_size: True}, so that the server gives the size of the binary field as its value, instead of its content. This change on binary fields reduces network load when accessing a view with binary fields. --- addons/web/static/src/js/core/utils.js | 3 --- 1 file changed, 3 deletions(-) (limited to 'addons/web/static/src/js/core/utils.js') diff --git a/addons/web/static/src/js/core/utils.js b/addons/web/static/src/js/core/utils.js index b9f5a7c9689..091c6448561 100644 --- a/addons/web/static/src/js/core/utils.js +++ b/addons/web/static/src/js/core/utils.js @@ -31,9 +31,6 @@ var utils = { * @return {string} bin_size (human-readable) */ binaryToBinsize: function (value) { - if (!value) { - return this.human_size(0); - } if (!this.is_bin_size(value)) { // Computing approximate size out of base64 encoded string // http://en.wikipedia.org/wiki/Base64#MIME -- cgit v1.2.3