From a52694d6b21d465afe071a6a701747f6ed7d480f Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Wed, 25 Feb 2015 22:56:47 +0100 Subject: [PATCH] [IMP] base_location_geonames_import: Several improvements and added hooks * Added Icon. * Improve module description and extracted to README.rst. * Pass country instead of country_id for advance comparisons. * Allow to transform city name. * Some code style. * Do not remove all entries of a country, but only not found. * Include hooks for transforming some things. * Include spanish translation. --- base_location/README.rst | 34 +- base_location/static/description/icon.png | Bin 0 -> 7055 bytes base_location/static/description/icon.svg | 304 +++++++ base_location_geonames_import/README.rst | 55 ++ base_location_geonames_import/__openerp__.py | 30 +- .../i18n/base_location_geonames_import.pot | 4 +- base_location_geonames_import/i18n/es.po | 68 ++ base_location_geonames_import/i18n/fr.po | 4 +- base_location_geonames_import/i18n/it.po | 2 +- .../static/description/icon.png | Bin 0 -> 13202 bytes .../static/description/icon.svg | 782 ++++++++++++++++++ .../wizard/geonames_import.py | 86 +- .../wizard/geonames_import_view.xml | 68 +- 13 files changed, 1329 insertions(+), 108 deletions(-) create mode 100644 base_location/static/description/icon.png create mode 100644 base_location/static/description/icon.svg create mode 100644 base_location_geonames_import/README.rst create mode 100644 base_location_geonames_import/i18n/es.po create mode 100644 base_location_geonames_import/static/description/icon.png create mode 100644 base_location_geonames_import/static/description/icon.svg diff --git a/base_location/README.rst b/base_location/README.rst index 817183a5b..8c0350d9e 100644 --- a/base_location/README.rst +++ b/base_location/README.rst @@ -8,13 +8,33 @@ It enables zip, city, state and country auto-completion on partners and companie Also allows different search filters. -Author ------- - -- Nicolas Bessi. (Copyright Camptocamp SA) +Credits +======= Contributors ------------ -- Ignacio Ibeas (Acysos S.L.) -- Pedro M. Baeza -- Alejandro Santana + +* Nicolas Bessi. (Copyright Camptocamp SA) +* Ignacio Ibeas (Acysos S.L.) +* Pedro M. Baeza +* Alejandro Santana + +Icon +---- +* http://icon-park.com/icon/location-map-pin-orange3/ + + +Maintainer +---------- + +.. image:: http://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: http://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit http://odoo-community.org. \ No newline at end of file diff --git a/base_location/static/description/icon.png b/base_location/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..2c8a0a336d1cc2c5a699d5e9eca60e2dfd5d4f33 GIT binary patch literal 7055 zcmV;A8*t=_P)lKYHTaqRDC0UkiY?CE~ zumRiP0C9Xtv6Wqugs=f8soiCFLwQwOu$8Lhk5nawV7z%iT>}+DcoYR|dx5YJVadV> zKS8z_KM<0odv)hM)7|InA3c5VnKRupbEkVASKq2%^*npJ&+q$to!1DZ6qgdRGh!XE z8Q4-kZU$1onY#SEems|%RdP_*IV=z>l>pfpVF8DMyMQ+WTk({g21q0XiG+7Vfa@w; z2VAMZyJZ(Ri${jzz*m6BGqbAN|GOC+RuloUGh!Tg3!c*N5Q2@PqZVUh7RjV&RC)`z zuEKTwqoPt#l*=wsQUtzOQ~KDLg=nqo zWua1$l*^KGN#Z!l1-=h_7WmuDtg_?#rQyL)6CgVyZUg>I2;ML`nP7a}Vr0bX%WvDZ zqFk2b^DeHdP67W7_{Yrb5I0yC7)kxzn@AwYIU{1))==!i8wJ)Iz(8V<#qa9zbh&ZStA68N9Mk(C@422Ox_IrlLk_{f^+ zB;(`#iSbcUttl?dIY_C#1iUXZs|tg@rfx7$0%T{z6fm2x#M{@cO_ELzr`3nSbrt95 z9Bf-X4ZI^Wt6m!PH7yqdBS3aW>;%4?N{Kz|)+7g(z!%0wt<`I$ld;zFgF?RGk}J3_@F$sB^_PRbo=(ws0%T{zjlg%OCKF?; zCK7%9?Ovl&mCP+TD8+xs%&PxA=5fJonCcmDc?uABAL%QHQ-k> zv+BEpzMgjITgsiC5o5qVkEE?jR`~#9qZX?s5^3O{vNPiH0bfpA^t0yr+hjuAv}P)a zQe4t9Ii6s2#99x0H9I3#^|6hYjlK{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+fVF(ET9ajcT)5h%en|_q5w733T1?)8&D(=*p9L@E7e0};>TbDnK zRT$(I-%GJh6A|`321bJ7%UIG<92F!`I5?53SYf z7-|9-mSgr0G=~B!QE}I9_|ZZoy#CKsK#osT+|Aq1&^&dk(;8pT^jDnK>lkVRXbAEI zfh4fE?KobnCwW2ff1v`-mdnr3IIdty(40NJS8w2>cyVFq31Bp6+oaIhf6EDJS+#`< zII2-9E|hF=uGoE=B}JQx5327?<%f;muPEii3Lt=nprp_oIjpI%iGsUo^|Sd}GXV-! zkXFKRuiX1nf?a;Q8M|Slcq<~_2VtcUz*K&#%Ah9KY|TOTu&gkWKP-+RNY1oP_BVmyYV!^^YzW?+MSHwuW04N z3L!uMS|)?)+8dvfmQ^ciVW1|x@=tEw_5#6{UnIOs_mWgTtULmQmG_NaAU#r+qZ2Qb zv@lSrfka4l?t6ytgioKyq0iQB`prv0`LKcr5Rhb<9zgFDDyymKlNGzs{maqumzkV8 zM|l5!(1_m9Oy1}PRty0Qg!Kt5PUBYVH=U^2UVnh2yoDcXa_VW?Z_dzap8kp~^;%&i z5};K%xVWIiy8h6U65MjVQ>f;ETC@HHjR~JQS3hWd-r`D~OHKK(G6?{!a{wEtiS--j zRVw{L)rP7AQi8Q}?-MkS=mibuHZ9K7j+Ycx6ahl=0MiRB4iT%-v12tGsy4_(^3}x7 zJ+II_bGPkOZ7!jt&%}x%fCf|XW@nH$L_D$TsBJ^71}c?4#!|T#wpb%<`c@xrt-n~Q z1b{}@95`bran+vhOT5*;YIN)<&2#rU8QkgD{R{*vjsPtNhnhNs(l_0DhOvo1Cz1MQ z`ta>vqD4EQUEBw$Vb!GHP~jeoXmPSe&CzDqje55kJ` t01!G|EG!fR9fPv{Mdib#nehkV{{vvlua>nKl*Ir5002ovPDHLkV1n%k>iYly literal 0 HcmV?d00001 diff --git a/base_location/static/description/icon.svg b/base_location/static/description/icon.svg new file mode 100644 index 000000000..c3e4d6059 --- /dev/null +++ b/base_location/static/description/icon.svg @@ -0,0 +1,304 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/base_location_geonames_import/README.rst b/base_location_geonames_import/README.rst new file mode 100644 index 000000000..6d48bdf4b --- /dev/null +++ b/base_location_geonames_import/README.rst @@ -0,0 +1,55 @@ +Base Location Geonames Import +============================= + +This module adds a wizard to import better zip entries from Geonames database. + +Installation +============ +For installing this module, you need these Python libraries: requests and +unicodecsv. + +Configuration +============= + +If want want/need to modify the default URL +(http://download.geonames.org/export/zip/), you can set the 'geonames.url' +system parameter. + +Usage +===== + +When you start the wizard, it will ask you to select a country. Then, for the +selected country, it will delete all the current better zip entries, download +the latest version of the list of cities from geonames.org and create new +better zip entries. + +Credits +======= + +Contributors +------------ + +* Alexis de Lattre +* Lorenzo Battistini +* Pedro M. Baeza + +Icon +---- +* http://icon-park.com/icon/location-map-pin-orange3/ +* http://commons.wikimedia.org/wiki/File:View-refresh.svg + + +Maintainer +---------- + +.. image:: http://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: http://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit http://odoo-community.org. \ No newline at end of file diff --git a/base_location_geonames_import/__openerp__.py b/base_location_geonames_import/__openerp__.py index 3f3641748..75332343d 100644 --- a/base_location_geonames_import/__openerp__.py +++ b/base_location_geonames_import/__openerp__.py @@ -29,31 +29,11 @@ 'category': 'Extra Tools', 'license': 'AGPL-3', 'summary': 'Import better zip entries from Geonames', - 'description': """ -Base Location Geonames Import -============================= - -This module adds a wizard to import better zip entries from Geonames -(http://download.geonames.org/export/zip/). -If want want/need to modify the URL, you can set the 'geonames.url' -system parameter. - -When you start the wizard, -it will ask you to select a country. Then, for the selected country, -it will delete all the current better zip entries, download the latest version -of the list of cities from geonames.org and create new better zip entries. - -Please contact Alexis de Lattre from Akretion -for any help or question about this module. - - -Contributors ------------- - -- Alexis de Lattre -- Lorenzo Battistini -""", - 'author': "Akretion,Odoo Community Association (OCA)", + 'author': 'Akretion, ' + 'Agile Business Group, ' + 'Antiun Ingeniería S.L., ' + 'Pedro M. Baeza, ' + 'Odoo Community Association (OCA)', 'website': 'http://www.akretion.com', 'depends': ['base_location'], 'external_dependencies': {'python': ['requests', 'unicodecsv']}, diff --git a/base_location_geonames_import/i18n/base_location_geonames_import.pot b/base_location_geonames_import/i18n/base_location_geonames_import.pot index 7c5782ea3..8b8fed1c9 100644 --- a/base_location_geonames_import/i18n/base_location_geonames_import.pot +++ b/base_location_geonames_import/i18n/base_location_geonames_import.pot @@ -34,7 +34,7 @@ msgstr "" #. module: base_location_geonames_import #: view:better.zip.geonames.import:0 -msgid "For the country selected above, this wizard will DELETE ALL THE CURRENT BETTER ZIP ENTRIES, download the latest version of the list of cities from geonames.org and create new better zip entries." +msgid "For the country selected above, this wizard will download the latest version of the list of cities from geonames.org, create new location entries if not found already in the system, and DELETE MISSING ENTRIES from new file." msgstr "" #. module: base_location_geonames_import @@ -57,7 +57,7 @@ msgstr "" #: view:better.zip.geonames.import:0 #: model:ir.actions.act_window,name:base_location_geonames_import.better_zip_geonames_import_action #: model:ir.ui.menu,name:base_location_geonames_import.better_zip_geonames_import_menu -msgid "Import Geonames" +msgid "Import from Geonames" msgstr "" #. module: base_location_geonames_import diff --git a/base_location_geonames_import/i18n/es.po b/base_location_geonames_import/i18n/es.po new file mode 100644 index 000000000..d90390cec --- /dev/null +++ b/base_location_geonames_import/i18n/es.po @@ -0,0 +1,68 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# * base_location_geonames_import +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-04-11 20:55+0000\n" +"PO-Revision-Date: 2014-04-11 20:55+0000\n" +"Last-Translator: <>\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Plural-Forms: \n" + +#. module: base_location_geonames_import +#: view:better.zip.geonames.import:0 +msgid "Cancel" +msgstr "Cancelar" + +#. module: base_location_geonames_import +#: field:better.zip.geonames.import,country_id:0 +msgid "Country" +msgstr "País" + +#. module: base_location_geonames_import +#: code:addons/base_location_geonames_import/wizard/geonames_import.py:66 +#: code:addons/base_location_geonames_import/wizard/geonames_import.py:90 +#, python-format +msgid "Error:" +msgstr "Error:" + +#. module: base_location_geonames_import +#: view:better.zip.geonames.import:0 +msgid "For the country selected above, this wizard will download the latest version of the list of cities from geonames.org, create new location entries if not found already in the system, and DELETE MISSING ENTRIES from new file." +msgstr "Para el país seleccionado arriba, este asistente descargará la última versión de la lista de ciudades de geonames.org, creará nuevas entradas de ubicaciones si no se encuentran ya en el sistema, y BORRARÁ LOS REGISTROS DESAPARECIDOS en el nuevo archivo." + +#. module: base_location_geonames_import +#: code:addons/base_location_geonames_import/wizard/geonames_import.py:91 +#, python-format +msgid "Got an error %d when trying to download the file %s." +msgstr "Se obtuvo un error %d cuando se descargaba el archivo %s." + +#. module: base_location_geonames_import +#: view:better.zip.geonames.import:0 +msgid "Import" +msgstr "Importar" + +#. module: base_location_geonames_import +#: model:ir.model,name:base_location_geonames_import.model_better_zip_geonames_import +msgid "Import Better Zip from Geonames" +msgstr "Importar ubicaciones de Geonames" + +#. module: base_location_geonames_import +#: view:better.zip.geonames.import:0 +#: model:ir.actions.act_window,name:base_location_geonames_import.better_zip_geonames_import_action +#: model:ir.ui.menu,name:base_location_geonames_import.better_zip_geonames_import_menu +msgid "Import from Geonames" +msgstr "Importar de GeoNames" + +#. module: base_location_geonames_import +#: code:addons/base_location_geonames_import/wizard/geonames_import.py:67 +#, python-format +msgid "The country code inside the file (%s) doesn't correspond to the selected country (%s)." +msgstr "El código de país dentro del archivo (%s) no se corresponde con el país seleccionado (%s)." + diff --git a/base_location_geonames_import/i18n/fr.po b/base_location_geonames_import/i18n/fr.po index 699ad7519..83d187777 100644 --- a/base_location_geonames_import/i18n/fr.po +++ b/base_location_geonames_import/i18n/fr.po @@ -57,8 +57,8 @@ msgstr "Import Better Zip from Geonames" #: view:better.zip.geonames.import:0 #: model:ir.actions.act_window,name:base_location_geonames_import.better_zip_geonames_import_action #: model:ir.ui.menu,name:base_location_geonames_import.better_zip_geonames_import_menu -msgid "Import Geonames" -msgstr "Importer Geonames" +msgid "Import from Geonames" +msgstr "Importer de Geonames" #. module: base_location_geonames_import #: code:addons/base_location_geonames_import/wizard/geonames_import.py:67 diff --git a/base_location_geonames_import/i18n/it.po b/base_location_geonames_import/i18n/it.po index cf2a22ed7..63e061099 100644 --- a/base_location_geonames_import/i18n/it.po +++ b/base_location_geonames_import/i18n/it.po @@ -66,7 +66,7 @@ msgstr "Importa Better Zip da Geonames" #: model:ir.actions.act_window,name:base_location_geonames_import.better_zip_geonames_import_action #: model:ir.ui.menu,name:base_location_geonames_import.better_zip_geonames_import_menu msgid "Import Geonames" -msgstr "Importa Geonames" +msgstr "Importa da Geonames" #. module: base_location_geonames_import #: code:addons/base_location_geonames_import/wizard/geonames_import.py:67 diff --git a/base_location_geonames_import/static/description/icon.png b/base_location_geonames_import/static/description/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..9b0eb86e37a8f01b63254f10c8e0f6cf670e9724 GIT binary patch literal 13202 zcmW++1z1z>7rtY3Il3DO>24U^-5nAF(k%l9A|N0l-5p9dC?QBm3rKgTq@%(Ae*ZnY zyW4%fyL<9I@A;ndUPntA51SGj002By6$L%y8UEjaiH`j2m9`y0o=|<{R1GkZFBqnM z4DvUYr;4c$a{b(Y2S|=BI}mx1!dKD6SKq_YH^A200SE{P;C6O*^?7OQ>A>yb?Ua2Y zNeKY-fU1J5L150Gkf1nZsoeR}d8Lls@j@u3(t^fPz*OB;() z@mAIMqa>gHRRR0%4AgKp-~_0{fj&9F(8@Z#hBy4$y`Xdq7?#VuK#O z2k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+kG-Kt&EBG);S^`AS8K%*M15k*Pp7bUK=r~_@KD` z*O|S%_CxStbNTYjbHf@MSARm)wE5l%8Pv*2Y#$dANapZ9#i4B8LKJeV^=FC}OEmfb zdR++&%jkDicf+v5Pl3HpozYhfDCQt)BZZ+gf4h^gKw6kkP>)(_{fU<-P*Df5|v5!>M@)F6%An-trvx9^_4ry4Sy4 zner12+KAlKZ-p)50myjw!}I&E>p*TlqfVS783-gWyu%AdH;wgXqRc_xc1_;tSi7!2=A2*|G|=7MI6%BYj;>N+A8a1#2XJhfVxt0Y9uulf7u2G?F5_sB@G zGPw8z84pPRez;ZMsM~o9*+ig)R3izpQ}DPjPqoRSS>hg)nN*&WpeOL>UIlke#L6a| za|BcA?a$VoVB@(OccH@%2c+-Kc)vuwJxI&WZ0Ulo7ls8v-uIbpVYojgg(B|g%YcFp z%;RkPCh=PNY1~Ikz0o1PCs%p?eLI1TGq3#08e(334?1Szz)MSf!+WTz>uUe%R=#Vu}WE2onH*s4j}DWA7- z`{ghd<&Z%Q00zW{-Blv;Jo^Ny3hTTQ9f}F;duQHL)bu~M$;;GP#%!cXzpfZh{{x4& XC#<&@dn+O5{Qy-(Erl96n~47biYxHo literal 0 HcmV?d00001 diff --git a/base_location_geonames_import/static/description/icon.svg b/base_location_geonames_import/static/description/icon.svg new file mode 100644 index 000000000..60d8003eb --- /dev/null +++ b/base_location_geonames_import/static/description/icon.svg @@ -0,0 +1,782 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/base_location_geonames_import/wizard/geonames_import.py b/base_location_geonames_import/wizard/geonames_import.py index 9fb2cf355..47307cea4 100644 --- a/base_location_geonames_import/wizard/geonames_import.py +++ b/base_location_geonames_import/wizard/geonames_import.py @@ -35,7 +35,7 @@ import logging logger = logging.getLogger(__name__) -class better_zip_geonames_import(models.TransientModel): +class BetterZipGeonamesImport(models.TransientModel): _name = 'better.zip.geonames.import' _description = 'Import Better Zip from Geonames' _rec_name = 'country_id' @@ -43,59 +43,76 @@ class better_zip_geonames_import(models.TransientModel): country_id = fields.Many2one('res.country', 'Country', required=True) @api.model - def _prepare_better_zip(self, row, country_id): - state = self.select_or_create_state(row, country_id) + def transform_city_name(self, city, country): + """Override it for transforming city name (if needed) + :param city: Original city name + :param country: Country record + :return: Transformed city name + """ + return city + + @api.model + def _domain_search_better_zip(self, row, country): + return [('name', '=', row[1]), + ('city', '=', self.transform_city_name(row[2], country)), + ('country_id', '=', country.id)] + + @api.model + def _prepare_better_zip(self, row, country): + state = self.select_or_create_state(row, country) vals = { 'name': row[1], - 'city': row[2], + 'city': self.transform_city_name(row[2], country), 'state_id': state.id, - 'country_id': country_id, + 'country_id': country.id, } return vals @api.model - def create_better_zip( - self, row, country_id, country_code): - bzip_id = False - if row[0] != country_code: + def create_better_zip(self, row, country): + if row[0] != country.code: raise Warning( - _('Error:'), _("The country code inside the file (%s) doesn't " "correspond to the selected country (%s).") - % (row[0], country_code)) + % (row[0], country.code)) logger.debug('ZIP = %s - City = %s' % (row[1], row[2])) if row[1] and row[2]: - vals = self._prepare_better_zip(row, country_id) - if vals: - bzip_id = self.env['res.better.zip'].create(vals) - return bzip_id + zip_model = self.env['res.better.zip'] + zips = zip_model.search(self._domain_search_better_zip( + row, country)) + if zips: + return zips[0] + else: + vals = self._prepare_better_zip(row, country) + if vals: + return zip_model.create(vals) + else: + return False @api.model def select_or_create_state( - self, row, country_id, code_row_index=4, name_row_index=3 - ): + self, row, country, code_row_index=4, name_row_index=3): states = self.env['res.country.state'].search([ - ('country_id', '=', country_id), + ('country_id', '=', country.id), ('code', '=', row[code_row_index]), ]) if len(states) > 1: raise Warning( - _("Too many states with code %s for counrty %s") - % (row[code_row_index], country_id)) + _("Too many states with code %s for country %s") + % (row[code_row_index], country.code)) if len(states) == 1: return states[0] else: return self.env['res.country.state'].create({ 'name': row[name_row_index], 'code': row[code_row_index], - 'country_id': country_id + 'country_id': country.id }) @api.one def run_import(self): - bzip_obj = self.env['res.better.zip'] - country_id = self.country_id.id - country_code = self.country_id.code.upper() + zip_model = self.env['res.better.zip'] + country_code = self.country_id.code config_url = self.pool['ir.config_parameter'].get_param( self._cr, self._uid, 'geonames.url', default='http://download.geonames.org/export/zip/%s.zip') @@ -104,27 +121,28 @@ class better_zip_geonames_import(models.TransientModel): res_request = requests.get(url) if res_request.status_code != requests.codes.ok: raise Warning( - _('Error:'), _('Got an error %d when trying to download the file %s.') % (res_request.status_code, url)) - bzip_ids_to_delete = bzip_obj.search([('country_id', '=', country_id)]) - if bzip_ids_to_delete: - bzip_ids_to_delete.unlink() - logger.info( - '%d better zip entries deleted for country %s' - % (len(bzip_ids_to_delete), self.country_id.name)) + # Store current record list + zip_ids_to_delete = set(zip_model.search( + [('country_id', '=', self.country_id.id)]).ids) f_geonames = zipfile.ZipFile(StringIO.StringIO(res_request.content)) tempdir = tempfile.mkdtemp(prefix='openerp') f_geonames.extract('%s.txt' % country_code, tempdir) logger.info('The geonames zipfile has been decompressed') data_file = open(os.path.join(tempdir, '%s.txt' % country_code), 'r') data_file.seek(0) - logger.info( - 'Starting to create the better zip entries') + logger.info('Starting to create the better zip entries') for row in unicodecsv.reader( data_file, encoding='utf-8', delimiter=' '): - self.create_better_zip(row, country_id, country_code) + zip_id = self.create_better_zip(row, self.country_id) + if zip_id.id in zip_ids_to_delete: + zip_ids_to_delete.remove(zip_id.id) data_file.close() + if zip_ids_to_delete: + zip_model.browse(zip_ids_to_delete).unlink() + logger.info('%d better zip entries deleted for country %s' % + (len(zip_ids_to_delete), self.country_id.name)) logger.info( 'The wizard to create better zip entries from geonames ' 'has been successfully completed.') diff --git a/base_location_geonames_import/wizard/geonames_import_view.xml b/base_location_geonames_import/wizard/geonames_import_view.xml index efd37057d..d2c0082a1 100644 --- a/base_location_geonames_import/wizard/geonames_import_view.xml +++ b/base_location_geonames_import/wizard/geonames_import_view.xml @@ -1,44 +1,38 @@ - - - + - - asterisk.server.company - better.zip.geonames.import - -
- - - -
-
-
-
-
+ + asterisk.server.company + better.zip.geonames.import + +
+ + + +
+
+
+
+
- - Import Geonames - better.zip.geonames.import - form - form - new - + + Import from Geonames + better.zip.geonames.import + form + form + new + - + -
+