[FIX] base_import: fix error when trying to load a file and then clicking on cancel while file opener is opened

This commit is contained in:
Cedric Snauwaert
2016-07-01 16:57:27 +02:00
parent 52a380c539
commit 2f3b32c676
+1 -1
View File
@@ -318,7 +318,7 @@ var DataImport = Widget.extend(ControlPanelMixin, {
this.$('.oe_import_file_show').val(file !== undefined && file.name || '');
this.$buttons.filter('.o_import_button').add(this.$('.oe_import_file_reload'))
.prop('disabled', true);
if (!this.$('input.oe_import_file').val()) { return; }
if (!this.$('input.oe_import_file').val()) { return this['settings_changed'](); }
this.$('.oe_import_date_format').val('');
this.$el.removeClass('oe_import_preview oe_import_error');