From d4823e4067629fd3f7a4ac02ea28ef932b9f0048 Mon Sep 17 00:00:00 2001 From: "John Laterre (jol)" Date: Thu, 4 Nov 2021 15:12:30 +0000 Subject: [PATCH] [FIX] base_address_city: allow conservation of existing required attributes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently, the _fields_view_get_address() method replaces the field 'city' and all of its attributes. That causes problems for attributes that are defined in other previously installed modules. This fix allows the 'required' attributes to be conserved. closes odoo/odoo#79447 X-original-commit: 1ac8b5a40440e6c4fddc0e088064ea1a706d93ab Signed-off-by: William André (wan) Signed-off-by: John Laterre --- addons/base_address_city/models/res_partner.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/base_address_city/models/res_partner.py b/addons/base_address_city/models/res_partner.py index b47e5f627ef..97710736f98 100644 --- a/addons/base_address_city/models/res_partner.py +++ b/addons/base_address_city/models/res_partner.py @@ -39,7 +39,7 @@ class Partner(models.Model): attrs="{ 'invisible': [('country_enforce_cities', '=', True), '|', ('city_id', '!=', False), ('city', 'in', ['', False ])], 'readonly': [('type', '=', 'contact')%(parent_condition)s] - }" + }"%(required)s />