[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) <jvm@odoo.com>
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user