From 612c7ed73fb6998cf4ec89084806aa84ce74916b Mon Sep 17 00:00:00 2001 From: Yann Papouin Date: Tue, 1 Dec 2020 09:35:03 +0100 Subject: [PATCH] [FIX] Update name when changing city's state or country --- base_location/models/res_city_zip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base_location/models/res_city_zip.py b/base_location/models/res_city_zip.py index 1217a43db..686c8ec8c 100644 --- a/base_location/models/res_city_zip.py +++ b/base_location/models/res_city_zip.py @@ -32,7 +32,7 @@ class ResCityZip(models.Model): ] @api.multi - @api.depends('name', 'city_id') + @api.depends('name', 'city_id', 'city_id.state_id', 'city_id.country_id') def _compute_new_display_name(self): for rec in self: name = [rec.name, rec.city_id.name]