[FIX] web: disable {bin_size: true} on binary fields

Revision on 41fe7f9d11

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.
This commit is contained in:
Alexandre Kühn
2018-01-15 10:03:14 +01:00
parent 2a244e3e66
commit 2a5488619d
6 changed files with 7 additions and 15 deletions
@@ -1080,7 +1080,6 @@ var AbstractFieldBinary = AbstractField.extend({
},
'click .o_clear_file_button': 'on_clear',
}),
context: { bin_size: true },
init: function (parent, name, record) {
this._super.apply(this, arguments);
this.fields = record.fields;