From 40d454bc26f771b6e27191e38f95f01731fbcb7d Mon Sep 17 00:00:00 2001 From: Alex Comba Date: Wed, 4 May 2016 12:22:16 +0200 Subject: [PATCH] base_location_geonames_import: fix country.code according to new data format --- base_location_geonames_import/wizard/geonames_import.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/base_location_geonames_import/wizard/geonames_import.py b/base_location_geonames_import/wizard/geonames_import.py index fc8eb7a00..3ef499c6f 100644 --- a/base_location_geonames_import/wizard/geonames_import.py +++ b/base_location_geonames_import/wizard/geonames_import.py @@ -60,11 +60,11 @@ class BetterZipGeonamesImport(models.TransientModel): @api.model def create_better_zip(self, row, country): - if row[0] != country.code: + if row[8] != country.code: raise Warning( _("The country code inside the file (%s) doesn't " "correspond to the selected country (%s).") - % (row[0], country.code)) + % (row[8], country.code)) logger.debug('ZIP = %s - City = %s' % (row[1], row[2])) if (self.title_case): row[2] = row[2].title()