[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.
This commit is contained in:
committed by
Alexandre Kühn
parent
7813a8e714
commit
41fe7f9d11
@@ -1080,6 +1080,7 @@ 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;
|
||||
|
||||
Reference in New Issue
Block a user