[MERGE] forward port of branch 7.0 up to 16a545b
This commit is contained in:
@@ -5390,6 +5390,17 @@ instance.web.form.FieldBinaryFile = instance.web.form.FieldBinary.extend({
|
||||
this._super.apply(this, arguments);
|
||||
this.$el.find('input').eq(0).val('');
|
||||
this.set_filename('');
|
||||
},
|
||||
set_value: function(value_){
|
||||
var changed = value_ !== this.get_value();
|
||||
this._super.apply(this, arguments);
|
||||
// Trigger value change if size is the same
|
||||
if (!changed){
|
||||
this.trigger("change:value", this, {
|
||||
oldValue: value_,
|
||||
newValue: value_
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user