From d0d7dbb00da9904ab82677e49fd144463fe0ff54 Mon Sep 17 00:00:00 2001 From: "Walid HANNICHE (waha)" Date: Thu, 15 Sep 2022 16:20:33 +0000 Subject: [PATCH] [FIX] base_address_extended: enforce city in "Contacts & Addresses" Steps to reproduce: -Install "base_address_extended" module ("base_address_city" in 15.0) -Go to an already existing contact. -Add a new address to this contact. -Use a country that enforces cities (contact>configuration>countries). -No drop menu for cities is displayed. Bug: unable to select all the city fields in the inherited XML views Fix: selected the correct city fields opw-2960154 closes odoo/odoo#103775 X-original-commit: 829541fa509f84cf4c8b0e22181770267a3e6e59 Signed-off-by: Quentin De Paoli Signed-off-by: Walid Hanniche (waha) --- .../views/base_address_extended.xml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/addons/base_address_extended/views/base_address_extended.xml b/addons/base_address_extended/views/base_address_extended.xml index 5c1db785980..dec44b58d7d 100644 --- a/addons/base_address_extended/views/base_address_extended.xml +++ b/addons/base_address_extended/views/base_address_extended.xml @@ -74,6 +74,22 @@ attrs="{'invisible': [('country_enforce_cities', '=', False)], 'readonly': [('type', '=', 'contact'),('parent_id', '!=', False)]}" context="{'default_country_id': country_id, 'default_state_id': state_id, 'default_zipcode': zip}"/> + + + + {'invisible': [('country_enforce_cities', '=', True), '|', ('city_id', '!=', False), ('city', 'in', ('',False))], + 'readonly': [('type', '=', 'contact'), ('parent_id', '!=', False)]} + + + + + +