From c1ddd1c29faa28ef6a8d7644b0fd77df92552de8 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Wed, 25 Jan 2023 07:35:53 +0000 Subject: [PATCH] [FIX] base: no crash when leaving contact with empty name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Go to Contacts, click Create, leave the name empty, click on a stat button (e.g. Meetings). Before this commit, there's a crash. It happens because the `name` field is present twice in the view, with different `required` attrs. Only one of them is visible, depending on the `is_company` field. Commit [1] introduced a sub part to the required domains to fix an issue with the way the legacy form view handled required fields (basically, the field `name` was displayed twice in the notification indicating that there were invalid fields), thus making those two domains different. With wowl views, this patch is no longer necessary, as the required attrs is evaluated in the model, so once for each field. Thus, having two different required domain doesn't make sense anymore (the last one wins). This commit fixes the issue by removing the domain sub parts added by [1]. [1] 8143a641a2883c8a8dc891c0e8cdef43fc6a73c0 Task 3086014 closes odoo/odoo#111711 X-original-commit: a1ed27352f393b8fff8c4f8985e3f503a07e6e37 Signed-off-by: Géry Debongnie Signed-off-by: Aaron Bohy (aab) --- odoo/addons/base/views/res_partner_views.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/odoo/addons/base/views/res_partner_views.xml b/odoo/addons/base/views/res_partner_views.xml index b1140f155ab..89a333773ef 100644 --- a/odoo/addons/base/views/res_partner_views.xml +++ b/odoo/addons/base/views/res_partner_views.xml @@ -173,8 +173,8 @@

- - + +