From 0bd5a85fd0894ee2149b53f43fd5b3befe597329 Mon Sep 17 00:00:00 2001 From: Olga Lugova Date: Tue, 8 May 2018 19:38:27 +0300 Subject: [PATCH] added cheking by states --- base_location_geonames_import/wizard/geonames_import.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/base_location_geonames_import/wizard/geonames_import.py b/base_location_geonames_import/wizard/geonames_import.py index 163491f27..87b67257e 100644 --- a/base_location_geonames_import/wizard/geonames_import.py +++ b/base_location_geonames_import/wizard/geonames_import.py @@ -53,12 +53,14 @@ class BetterZipGeonamesImport(models.TransientModel): @api.model def _domain_search_res_city(self, row, country): return [('name', '=', self.transform_city_name(row[2], country)), + ('state_id.name', '=', row[3]), ('country_id', '=', country.id)] @api.model def _domain_search_better_zip(self, row, country, res_city): domain = [('name', '=', row[1]), ('city', '=', self.transform_city_name(row[2], country)), + ('state_id.name', '=', row[3]), ('country_id', '=', country.id)] if res_city: domain += [('city_id', '=', res_city.id)]