From 905eed0de17cdfee070bb7ca6dc0e444a1dceece Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Theys?= Date: Tue, 10 Dec 2019 14:46:30 +0000 Subject: [PATCH] [FIX] web: introduce format for `many2one_reference` for form view MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The format of `many2one_reference` was not introduced when the new field type was created, which leads to empty values when the web client is trying to display the value of such fields in form views. Since the value of this field is an ID, it is decided to display it like an integer, which is consistent with previous behavior: the fields that are now `many2one_reference` are still stored as integer and they were already displayed as integer before. This was fixed in list views in commit d0c852f50e71bc4c9c2a08230f515fec6909b725 and the current commit fixes it for form views. opw-2127010 closes #38009 closes odoo/odoo#41666 X-original-commit: c37a16c9dfd09038925034b90ab49e1ab674e714 Signed-off-by: Sébastien Theys (seb) --- addons/web/static/src/js/fields/field_registry.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/js/fields/field_registry.js b/addons/web/static/src/js/fields/field_registry.js index 9adb578639f..b121b3e04f7 100644 --- a/addons/web/static/src/js/fields/field_registry.js +++ b/addons/web/static/src/js/fields/field_registry.js @@ -61,7 +61,8 @@ registry .add('toggle_button', basic_fields.FieldToggleBoolean) .add('dashboard_graph', basic_fields.JournalDashboardGraph) .add('ace', basic_fields.AceEditor) - .add('color', basic_fields.FieldColor); + .add('color', basic_fields.FieldColor) + .add('many2one_reference', basic_fields.FieldInteger); // Relational fields registry