[FIX] base_address_city: avoid showing city and city_id field together

Before this commit, when the city_id field was set and then removed,
both city and city_id were shown, you would see 2 city fields in a weird
way.

opw-2312641

closes odoo/odoo#56896

X-original-commit: b381fb0b644cf3c94e798319ceecf5d6b97df9ad
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
This commit is contained in:
Jorge Pinna Puissant
2020-09-01 14:02:17 +00:00
parent ba693a7e02
commit d7af73dcb1
@@ -19,6 +19,10 @@ class Partner(models.Model):
self.city = self.city_id.name
self.zip = self.city_id.zipcode
self.state_id = self.city_id.state_id
else:
self.city = False
self.zip = False
self.state_id = False
@api.model
def _fields_view_get_address(self, arch):