[IMP] base_import: fix field dropdown list return values

When generating field completion, if there are no o2m or suggested fields,
the method was returning the list of values without adding the regulars fields.

This commit returns correctly the complete set of values.

Task ID: 2508902

closes odoo/odoo#69423

X-original-commit: 134b0f28a43042b22bed1c5f657344544e0f8d22
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
This commit is contained in:
David Beguin
2021-04-16 16:54:52 +00:00
parent e59b032f06
commit 49dc69cfea
@@ -755,14 +755,13 @@ var DataImport = AbstractAction.extend({
if (!_.isEmpty(suggested)) {
basic = basic.concat({ text: _t("Suggested Fields"), children: suggested });
}
basic = basic.concat([
return basic.concat([
{ text: !_.isEmpty(suggested) ? _t("Additional Fields") : _t("Standard Fields"), children: regulars },
{ text: _t("Relation Fields"), children: o2m },
]);
} else {
basic.concat(suggested, regulars, o2m);
return basic.concat(suggested, regulars, o2m);
}
return basic;
},
render_fields_matches: function (result, $fields) {
if (_(result.matches).isEmpty()) { return; }