From 8accb95e8afdf0219ae3c753f494e09f6a8fa0d5 Mon Sep 17 00:00:00 2001 From: sergiocorato Date: Mon, 25 May 2020 10:48:04 +0200 Subject: [PATCH] [FIX] partner without city_id --- base_location/models/res_partner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base_location/models/res_partner.py b/base_location/models/res_partner.py index f62309e95..5d93e08cb 100644 --- a/base_location/models/res_partner.py +++ b/base_location/models/res_partner.py @@ -83,7 +83,7 @@ class ResPartner(models.Model): raise ValidationError(_( "The country of the partner %s differs from that in " "location %s") % (rec.name, rec.zip_id.name)) - if rec.zip_id.city_id != rec.city_id: + if rec.city_id and rec.zip_id.city_id != rec.city_id: raise ValidationError(_( "The city of partner %s differs from that in " "location %s") % (rec.name, rec.zip_id.name))