Browse Source

[FIX] partner without city_id

12.0
sergiocorato 5 years ago
parent
commit
8accb95e8a
  1. 2
      base_location/models/res_partner.py

2
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))

Loading…
Cancel
Save