From c8cbde1ff20b961417c916b74721b3f922f13b00 Mon Sep 17 00:00:00 2001 From: "Abdelouahab (abla)" Date: Wed, 15 Mar 2023 15:38:52 +0000 Subject: [PATCH] [FIX] base_import: import subfields To reproduce ============ - on any app try to import a record that has subfields - subfields are not matched and not even found on the list Problem ======= comparing to 16 **Allowing subfields matching** is disabled here in 16.1, because of this condition that is checking the list of fields on a variable `fields`, but this variable is not set before importing the file, so the condition is always true. Solution ======== apply the condition on `res.fields` instead opw-3209365 closes odoo/odoo#115639 X-original-commit: 284fab64e33ca398a0ebf69d3d6d59685480156d Signed-off-by: Luca Vitali --- addons/base_import/static/src/import_model.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/base_import/static/src/import_model.js b/addons/base_import/static/src/import_model.js index eb36d7ee57c..fc538147ce1 100644 --- a/addons/base_import/static/src/import_model.js +++ b/addons/base_import/static/src/import_model.js @@ -432,7 +432,7 @@ export class BaseImportModel { } } - if (!this.fields.length) { + if (!res.fields.length) { this.importOptionsValues.advanced.value = res.advanced_mode; }