once widget extended with ReinitializeFieldMixin, the event binding with the binary file input and the on_file_change method can be done in initialize_content instead of start
This fix is related to
d36c8b5c9bf7ab9215bc63db6ee49bec5e5b225b
this.fileupload_id = _.uniqueId('oe_fileupload_temp');
$(window).on(this.fileupload_id, _.bind(this.on_file_loaded, this));
},
- start: function() {
- this._super();
- instance.web.form.ReinitializeFieldMixin.start.call(this);
+ initialize_content: function() {
this.$el.on('change', 'input.oe_form_binary_file', this.on_file_change );
},
set_value: function(value_) {