|
|
@ -79,8 +79,8 @@ class CityZipGeonamesImport(models.TransientModel): |
|
|
|
"WHERE name = %s AND country_id = %s AND state_id = %s LIMIT 1", |
|
|
|
(self.transform_city_name(row[2], country), country.id, state_id), |
|
|
|
) |
|
|
|
row = self.env.cr.fetchone() |
|
|
|
return (row[0], row[1]) if row else (False, False) |
|
|
|
row_city = self.env.cr.fetchone() |
|
|
|
return (row_city[0], row_city[1]) if row_city else (False, False) |
|
|
|
|
|
|
|
@api.model |
|
|
|
def select_zip(self, row, country, state_id): |
|
|
@ -171,7 +171,7 @@ class CityZipGeonamesImport(models.TransientModel): |
|
|
|
city_id, city_name = ( |
|
|
|
self.select_city(row, self.country_id, state_id) |
|
|
|
if search_cities |
|
|
|
else False |
|
|
|
else (False, False) |
|
|
|
) |
|
|
|
if not city_id: |
|
|
|
city_vals = self.prepare_city(row, self.country_id, state_id) |
|
|
|