[MERGE] forward port of branch 7.0 up to 16a545b

This commit is contained in:
Christophe Simonis
2015-06-24 12:34:03 +02:00
3 changed files with 15 additions and 1 deletions
+11
View File
@@ -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_
});
}
}
});