summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/view_form.js
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2015-06-24 12:34:03 +0200
committerChristophe Simonis <chs@odoo.com>2015-06-24 12:34:03 +0200
commitea659cbd87f185db247c1807d32ab0d4e3e04fe9 (patch)
treeefde9a1bad599afd4ce0c665c4d183abb42bb820 /addons/web/static/src/js/view_form.js
parent9cdfb0696a350d71f32fe7ac699679d40d2d28e2 (diff)
parent16a545b1bafc89bc68d270bc77c5c5edddfb7367 (diff)
[MERGE] forward port of branch 7.0 up to 16a545b
Diffstat (limited to 'addons/web/static/src/js/view_form.js')
-rw-r--r--addons/web/static/src/js/view_form.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/addons/web/static/src/js/view_form.js b/addons/web/static/src/js/view_form.js
index 1fc1297ee03..f360b1b7783 100644
--- a/addons/web/static/src/js/view_form.js
+++ b/addons/web/static/src/js/view_form.js
@@ -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_
+ });
+ }
}
});