From 5a60dbccd48fea052bf203c11d43e367b6bb4360 Mon Sep 17 00:00:00 2001 From: jvm-odoo Date: Mon, 6 Jul 2020 07:29:54 +0000 Subject: [PATCH] [FIX] base_import: fix re-importing same file Issue Chrome - Sales > Product - Select a file - Change something in the file - Re-select it Nothing changed Cause Chrome doesn't trigger change on input if the file is the same Solution Clear the input value after the parse_preview so we can load a new file even if the preview failed. OPW-2288191 closes odoo/odoo#54175 X-original-commit: f7d2bdf65901e3ee78e1055cab7cf8d60f798621 Signed-off-by: Jason Van Malder (jvm) --- addons/base_import/static/src/js/import_action.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/base_import/static/src/js/import_action.js b/addons/base_import/static/src/js/import_action.js index 85f37b46f65..0b608953978 100644 --- a/addons/base_import/static/src/js/import_action.js +++ b/addons/base_import/static/src/js/import_action.js @@ -373,6 +373,11 @@ var DataImport = AbstractAction.extend({ this.$form.toggleClass( 'oe_import_noheaders text-muted', !this.$('input.oe_import_has_header').prop('checked')); + + // Clear the input value to allow onchange to be triggered + // if the file is the same (for all browsers) + self.$('input.oe_import_file').val(''); + this._rpc({ model: 'base_import.import', method: 'parse_preview',