From ff78566d94974d3927adcb19be5db0712acc1fb5 Mon Sep 17 00:00:00 2001 From: Dave Lasley Date: Sun, 23 Apr 2017 17:00:18 -0700 Subject: [PATCH] [10.0][IMP] base_location(geonames): Add Lat/Long (#405) * [IMP] base_location: Add lat & long to `better.zip` * Add latitude and longitude columns to `better.zip` * [IMP] base_location_geonames_import: Add lat/long * Add support for latitude & longitude to genomes importer --- base_location/README.rst | 1 + base_location/__manifest__.py | 2 +- base_location/models/better_zip.py | 2 ++ base_location_geonames_import/README.rst | 1 + base_location_geonames_import/__manifest__.py | 2 +- base_location_geonames_import/wizard/geonames_import.py | 2 ++ 6 files changed, 8 insertions(+), 2 deletions(-) diff --git a/base_location/README.rst b/base_location/README.rst index 9cafe8b0c..5f52c2da8 100644 --- a/base_location/README.rst +++ b/base_location/README.rst @@ -43,6 +43,7 @@ Contributors * Sandy Carter * Yannick Vaucher * Francesco Apruzzese +* Dave Lasley Icon ---- diff --git a/base_location/__manifest__.py b/base_location/__manifest__.py index 969b89308..91b865f5e 100644 --- a/base_location/__manifest__.py +++ b/base_location/__manifest__.py @@ -4,7 +4,7 @@ { 'name': 'Location management (aka Better ZIP)', - 'version': '10.0.1.0.0', + 'version': '10.0.1.0.1', 'depends': [ 'base', ], diff --git a/base_location/models/better_zip.py b/base_location/models/better_zip.py index c85ea78ae..777f736ce 100644 --- a/base_location/models/better_zip.py +++ b/base_location/models/better_zip.py @@ -20,6 +20,8 @@ class BetterZip(models.Model): city = fields.Char('City', required=True) state_id = fields.Many2one('res.country.state', 'State') country_id = fields.Many2one('res.country', 'Country') + latitude = fields.Float() + longitude = fields.Float() @api.one @api.depends( diff --git a/base_location_geonames_import/README.rst b/base_location_geonames_import/README.rst index af9a3a12f..bab8b798c 100644 --- a/base_location_geonames_import/README.rst +++ b/base_location_geonames_import/README.rst @@ -55,6 +55,7 @@ Contributors * Alexis de Lattre * Lorenzo Battistini * Pedro M. Baeza +* Dave Lasley Icon ---- diff --git a/base_location_geonames_import/__manifest__.py b/base_location_geonames_import/__manifest__.py index ba69473e6..d8f4d4d4e 100644 --- a/base_location_geonames_import/__manifest__.py +++ b/base_location_geonames_import/__manifest__.py @@ -6,7 +6,7 @@ { 'name': 'Base Location Geonames Import', - 'version': '10.0.1.0.0', + 'version': '10.0.1.0.1', 'category': 'Partner Management', 'license': 'AGPL-3', 'summary': 'Import better zip entries from Geonames', diff --git a/base_location_geonames_import/wizard/geonames_import.py b/base_location_geonames_import/wizard/geonames_import.py index c3c3e1266..1d85f7652 100644 --- a/base_location_geonames_import/wizard/geonames_import.py +++ b/base_location_geonames_import/wizard/geonames_import.py @@ -59,6 +59,8 @@ class BetterZipGeonamesImport(models.TransientModel): 'city': self.transform_city_name(row[2], country), 'state_id': state.id, 'country_id': country.id, + 'latitude': row[9], + 'longitude': row[10], } return vals