diff --git a/l10n_es_toponyms/__openerp__.py b/l10n_es_toponyms/__openerp__.py index 6301a86cce9..29e38d0d9bd 100644 --- a/l10n_es_toponyms/__openerp__.py +++ b/l10n_es_toponyms/__openerp__.py @@ -24,20 +24,29 @@ ############################################################################## { - "name" : "Topónimos del Estado español", + "name" : "Topónimos españoles", "version" : "1.0", "author" : "Spanish Localization Team", "website" : "https://launchpad.net/openerp-spain", "category" : "Localisation/Europe", - "description": """Provincias, municipios y códigos postales del Estado español + "description": """ +Provincias, municipios y códigos postales de España. - * Añade las 52 provincias actuales del Estado español con posibilidad de escoger versión oficial, castellana o ambas. - * Proporciona un asistente para dar de alta los municipios y provincias por defecto asociados a los códigos postales del Estado español. Permite rellenar automáticamente los campos ciudad y provincia del formulario de empresa y contacto a partir del código postal. + * Añade las 52 provincias actuales de España con posibilidad de escoger + entre versión oficial, española o ambas. + * Proporciona un asistente para dar de alta los municipios y provincias por + defecto asociados a los códigos postales españoles. + * Utilizando el módulo base_location, permite rellenar automáticamente los + campos ciudad y provincia del formulario de empresa, de contacto y de + compañía a partir del código postal o el nombre de la ciudad. -Los datos han sido obtenidos de GeoNames (www.geonames.org). +Los datos han sido obtenidos de GeoNames (http://www.geonames.org). -AVISO: El asistente sólo funciona ejecutándose desde el usuario 'admin'.""", - "depends" : ["base"], +**AVISO:** Este módulo requiere el módulo *base_location*, disponible en: + +https://launchpad.net/partner-contact-management +""", + "depends" : ["base", "base_location"], "license" : "AGPL-3", "data" : [ "wizard/l10n_es_toponyms_wizard.xml", diff --git a/l10n_es_toponyms/gen_src/README.txt b/l10n_es_toponyms/gen_src/README.txt index 36e01b74dea..17275b0dfee 100644 --- a/l10n_es_toponyms/gen_src/README.txt +++ b/l10n_es_toponyms/gen_src/README.txt @@ -44,7 +44,7 @@ USO DEL SCRIPT PARA GEONAMES ============================================================================== Esta utilidad consulta al webservice de GeoNames por cada uno de los posibles códigos postales entre 1000 y 53000, volcando los resultados en el archivo -municipios_cpostal.py, necesario para el funcionamiento del módulo +'l10n_es_toponyms_zipcodes.xml', necesario para el funcionamiento del módulo l10n_es_toponyms. Al ser un gran número de consultas web, el proceso puede tardar bastante, y el propio servidor establece un límite máximo de consultas (en el momento de escribir esto, el límite era de 2000 por hora). Por eso, @@ -60,18 +60,18 @@ desde ese punto. python gen_toponyms_geonames.py --start número 4. Repetir el paso 3 tantas veces como sea necesario hasta que el script indique "Proceso terminado". -5. Copiar el archivo municipios_cpostal.py generado a la carpeta wizard del - módulo, sobreescribiendo el anterior. +5. Copiar el archivo 'l10n_es_toponyms_zipcodes.xml' generado a la carpeta + 'wizard' del módulo, sobreescribiendo el anterior. USO DEL SCRIPT PARA WWW.CODIGOSPOSTALES.COM ============================================================================== Esta utilidad convierte el archivo descargado de www.codigospostales.com -en el archivo municipios_cpostal.py, necesario para el funcionamiento del -módulo l10n_es_toponyms. +en el archivo l10n_es_toponyms_zipcodes.xml, necesario para el funcionamiento +del módulo l10n_es_toponyms. 1. Descargar archivo de www.codigospostales.com 2. Descomprimir el archivo .zip en una carpeta. 3. Ejecutar: python gen_toponyms_www_codigospostales_com.py -4. Copiar el archivo municipios_cpostal.py generado a la carpeta wizard del - módulo, sobreescribiendo el anterior. +4. Copiar el archivo 'l10n_es_toponyms_zipcodes.xml' generado a la carpeta + 'wizard' del módulo, sobreescribiendo el anterior. diff --git a/l10n_es_toponyms/gen_src/gen_toponyms_geonames.py b/l10n_es_toponyms/gen_src/gen_toponyms_geonames.py index 07108a9577f..6d23051400b 100644 --- a/l10n_es_toponyms/gen_src/gen_toponyms_geonames.py +++ b/l10n_es_toponyms/gen_src/gen_toponyms_geonames.py @@ -75,12 +75,14 @@ def filterCity(originalName): start = args.start # Preparar archivo en el que escribir if start == 1000: - output = open("municipios_cpostal.py", 'w') - output.write("# -*- encoding: utf-8 -*-\n") - output.write("cod_postales = [\n") + output = open("l10n_es_toponyms_zipcodes.xml", 'w') + output.write("\n") + output.write("\n") + output.write(" \n") else: - output = open("municipios_cpostal.py", 'a') + output = open("l10n_es_toponyms_zipcodes.xml", 'a') # Iterar por el rango de CPs + cont = 0 for cp in range (start, 53000): try: xml_string = urllib2.urlopen("http://ws.geonames.org/postalCodeSearch?postalcode=%05d&country=ES" %cp).read() @@ -90,14 +92,23 @@ def filterCity(originalName): print "Ha ocurrido un error inesperado. Pruebe a lanzar de nuevo el script con el parámetro --start y el número %s." %cp sys.exit() if handler.isServiceOk: + cp_str = "%05d" %cp print "%05d: %s" %(cp, handler.citys) for city in handler.citys: - output.writelines(' ["%05d", "%s"],\n' %(cp, filterCity(city).encode('utf-8'))) + cont += 1 + output.write(' \n' %cont) + output.write(' \n' %cp_str[:2]) + output.write(' %s\n' %filterCity(city).encode('utf-8')) + output.write(' %s\n' %cp_str) + output.write(' \n') + output.write(' \n') else: print "No se puede continuar la extracción de datos.\n%s\nContinúe después del tiempo indicado utilizando el parámetro --start con el número %s." %(handler.message.encode('utf-8'), cp) output.close() sys.exit() - output.write("]") + # Se ha terminado ya con todos los códigos postales + output.write(" \n") + output.write("\n") # Cerrar archivo output.close() print "Proceso terminado" diff --git a/l10n_es_toponyms/gen_src/gen_toponyms_www_codigospostales_com.py b/l10n_es_toponyms/gen_src/gen_toponyms_www_codigospostales_com.py index c62ee86fae0..05cec5a7dd3 100644 --- a/l10n_es_toponyms/gen_src/gen_toponyms_www_codigospostales_com.py +++ b/l10n_es_toponyms/gen_src/gen_toponyms_www_codigospostales_com.py @@ -49,8 +49,11 @@ def capitalizeSpanishCity(originalName): fIndex = open(os.path.join(sys.argv[1], "codciu.txt"), 'r') # Preparar archivo en el que escribir output = open("municipios_cpostal.py", 'w') - output.write("cod_postales = [\n") + output.write("\n") + output.write("\n") + output.write(" \n") # Leer líneas con los archivos de CPs + cont = 0 for line in fIndex: pos = 0 while line[pos].isdigit() or line[pos].islower(): @@ -61,10 +64,17 @@ def capitalizeSpanishCity(originalName): if line[pos-1] == 'x': # Códigos postales de municipios for lineCP in fCPs: + cont += 1 cp, ciudad = lineCP.split(':') - output.writelines(' ["%s", "%s"],\n' %(cp, capitalizeSpanishCity(ciudad[:-1]))) + output.write(' \n' %cont) + output.write(' \n' %cp[:2]) + output.write(' %s\n' %ciudad) + output.write(' %s\n' %cp) + output.write(' \n') + output.write(' \n') fCPs.close() - output.write("]") + output.write(" \n") + output.write("\n") # Cerrar archivos fIndex.close() output.close() diff --git a/l10n_es_toponyms/i18n/es.po b/l10n_es_toponyms/i18n/es.po index 5d7cb2b1ee7..da3933038c3 100644 --- a/l10n_es_toponyms/i18n/es.po +++ b/l10n_es_toponyms/i18n/es.po @@ -4,36 +4,26 @@ # msgid "" msgstr "" -"Project-Id-Version: OpenERP Server 7.0-20130127-000101\n" +"Project-Id-Version: OpenERP Server 7.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-01-31 11:31+0000\n" -"PO-Revision-Date: 2013-01-31 11:31+0000\n" +"POT-Creation-Date: 2013-07-11 15:30+0000\n" +"PO-Revision-Date: 2013-07-11 17:31+0100\n" "Last-Translator: Pedro Manuel Baeza \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: \n" +"Content-Transfer-Encoding: 8bit\n" "Plural-Forms: \n" #. module: l10n_es_toponyms -#: view:config.es.toponyms:0 -msgid "WARNING: Adding more than 15000 zip codes can take several minutes." -msgstr "AVISO: Añadir más de 15000 códigos postales puede llevar varios minutos." - -#. module: l10n_es_toponyms -#: selection:config.es.toponyms,city_info:0 -msgid "No" -msgstr "No" +#: selection:config.es.toponyms,state:0 +msgid "Both" +msgstr "Ambos" #. module: l10n_es_toponyms #: view:config.es.toponyms:0 -msgid "'State' and 'City' fields can be filled automatically in partner screen when you enter a zip code if this information is associated. Do you want to associate this data?" -msgstr "Los campos 'Provincia' y 'Ciudad' del formulario de las empresas (clientes y/o proveedores) pueden ser rellenados automáticamente cuando introduce el código postal si esta información se asocia. ¿Desea asociar los datos de ciudad y provincia a los códigos postales?" - -#. module: l10n_es_toponyms -#: help:config.es.toponyms,city_info:0 -msgid "Do you want to add city and state information associated to the zip codes for all the spanish cities? This allows to fill automatically the city and states fields of partner and contact forms from the zip code." -msgstr "¿Quiere asociar municipios y provincias a códigos postales de todos los municipios del Estado español? Permite rellenar automáticamente los campos 'Ciudad' y 'Provincia' del formulario de empresa a partir del código postal." +msgid "Spanish states and cities configuration" +msgstr "Configuración de las ciudades y provincias españolas" #. module: l10n_es_toponyms #: view:config.es.toponyms:0 @@ -41,87 +31,82 @@ msgid "Configure" msgstr "Configurar" #. module: l10n_es_toponyms -#: view:config.es.toponyms:0 -msgid "title" -msgstr "título" - -#. module: l10n_es_toponyms -#: view:config.es.toponyms:0 -msgid "Spanish states and cities configuration" -msgstr "Configuración de las provincias y ciudades españolas" +#: selection:config.es.toponyms,city_info:0 +msgid "No" +msgstr "No" #. module: l10n_es_toponyms #: model:ir.model,name:l10n_es_toponyms.model_config_es_toponyms msgid "config.es.toponyms" -msgstr "Asistente de configuración de los topónimos españoles" +msgstr "Configuración de los topónimos españoles" #. module: l10n_es_toponyms -#: field:config.es.toponyms,state:0 -msgid "State names" -msgstr "Nombre de las provincias" +#: selection:config.es.toponyms,state:0 +msgid "Official" +msgstr "Oficial" #. module: l10n_es_toponyms #: view:config.es.toponyms:0 -msgid "Associate city and state information to zip codes" -msgstr "Asociar la información de ciudad y provincia a los códigos postales" - -#. module: l10n_es_toponyms -#: model:ir.actions.act_window,name:l10n_es_toponyms.action_config_toponyms_es_form -msgid "Spanish toponyms configuration" -msgstr "Configuración de los topónimos del Estado español" +msgid "For example: Official (Girona), Spanish (Gerona), Both (Gerona / Girona)" +msgstr "Ejemplo: Oficial (Girona), Español (Gerona), Ambos (Gerona / Girona)" #. module: l10n_es_toponyms -#: selection:config.es.toponyms,state:0 -msgid "Both" -msgstr "Ambos" +#: field:config.es.toponyms,city_info:0 +msgid "City information" +msgstr "Información de ciudad" #. module: l10n_es_toponyms -#: field:config.es.toponyms,name:0 -msgid "Name" -msgstr "Nombre" +#: view:config.es.toponyms:0 +msgid "'State', 'City', 'ZIP' and 'Country' fields can be filled automatically in partner, contact and company screens when you enter a zip code or the city name if this information is associated. Do you want to associate this data?" +msgstr "Los campos 'Provincia', 'Ciudad', 'CP' y 'País' pueden rellenarse automáticamente en las pantallas de empresa, contacto y compañía si asocia esta información. ¿Desea asociar estos datos?" #. module: l10n_es_toponyms #: view:config.es.toponyms:0 -msgid "NOTE: If you are planning to install 'city' and 'l10n_es_toponyms_city' modules, this operation is not needed." -msgstr "NOTA: Si planea instalar los módulos 'city' y 'l10n_es_toponyms_city', esta operación no es necesaria." +msgid "Warning! Adding more than 56000 records can take a lot of time. If you are behind a SSL proxy, check your timeout." +msgstr "¡Aviso! Añadir más de 56000 registros puede tardar mucho tiempo. Si está detrás de un proxy SSL, compruebe el timeout." #. module: l10n_es_toponyms -#: selection:config.es.toponyms,state:0 -msgid "Official" -msgstr "Oficial" +#: field:config.es.toponyms,state:0 +msgid "State names" +msgstr "Nombres de las provincias" #. module: l10n_es_toponyms #: view:config.es.toponyms:0 -msgid "For example: Official (Girona), Spanish (Gerona), Both (Gerona / Girona)" -msgstr "Ejemplo: Oficial (Girona), Español (Gerona), Ambos (Gerona / Girona)" +msgid "title" +msgstr "título" #. module: l10n_es_toponyms -#: field:config.es.toponyms,city_info:0 -msgid "City information" -msgstr "Información de ciudad" +#: selection:config.es.toponyms,state:0 +msgid "Spanish" +msgstr "Español" #. module: l10n_es_toponyms #: model:ir.actions.todo,note:l10n_es_toponyms.config_wizard_toponyms_es msgid "You can select the toponym version of the spanish states and add the spanish cities associated to the zip codes." -msgstr "Puede seleccionar la versión de los topónimos de las provincias españolas y añadir las ciudades españolas asociadas a los códigos postales." +msgstr "Puede seleccionar la versión de los topónimos de las provincias y si asociar la información de las ciudades a los códigos postales." #. module: l10n_es_toponyms -#: help:config.es.toponyms,state:0 -msgid "Toponym version of the spanish states. For example: Official (Girona), Spanish (Gerona), Both (Gerona / Girona)" -msgstr "Versión de los topónimos de las provincias del Estado español. Por ejemplo: Oficial (Lleida), Castellano (Lérida), Ambos (Lérida / Lleida)" +#: view:config.es.toponyms:0 +msgid "Select the toponym version of the spanish states" +msgstr "Seleccione la versión de los topónimos para las provincias españolas" #. module: l10n_es_toponyms #: view:config.es.toponyms:0 -msgid "Select the toponym version of the spanish states" -msgstr "Seleccione la versión de los topónimos de las provincias del Estado español" +msgid "Associate city and state information to zip codes" +msgstr "Asociar la información de ciudad y provincia al código postal" #. module: l10n_es_toponyms -#: selection:config.es.toponyms,state:0 -msgid "Spanish" -msgstr "Español" +#: model:ir.actions.act_window,name:l10n_es_toponyms.action_config_toponyms_es_form +msgid "Spanish toponyms configuration" +msgstr "Configuración de los topónimos españoles" #. module: l10n_es_toponyms #: selection:config.es.toponyms,city_info:0 msgid "Yes" msgstr "Sí" +#. module: l10n_es_toponyms +#: field:config.es.toponyms,name:0 +msgid "Name" +msgstr "Nombre" + diff --git a/l10n_es_toponyms/i18n/l10n_es_toponyms.pot b/l10n_es_toponyms/i18n/l10n_es_toponyms.pot index a21820d1180..7e2a5fc551a 100644 --- a/l10n_es_toponyms/i18n/l10n_es_toponyms.pot +++ b/l10n_es_toponyms/i18n/l10n_es_toponyms.pot @@ -4,35 +4,25 @@ # msgid "" msgstr "" -"Project-Id-Version: OpenERP Server 7.0-20130127-000101\n" +"Project-Id-Version: OpenERP Server 7.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-01-31 11:31+0000\n" -"PO-Revision-Date: 2013-01-31 12:41+0100\n" -"Last-Translator: Pedro Manuel Baeza \n" +"POT-Creation-Date: 2013-07-11 15:36+0000\n" +"PO-Revision-Date: 2013-07-11 15:36+0000\n" +"Last-Translator: <>\n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" +"Content-Transfer-Encoding: \n" "Plural-Forms: \n" #. module: l10n_es_toponyms -#: view:config.es.toponyms:0 -msgid "WARNING: Adding more than 15000 zip codes can take several minutes." -msgstr "" - -#. module: l10n_es_toponyms -#: selection:config.es.toponyms,city_info:0 -msgid "No" +#: selection:config.es.toponyms,state:0 +msgid "Both" msgstr "" #. module: l10n_es_toponyms #: view:config.es.toponyms:0 -msgid "'State' and 'City' fields can be filled automatically in partner screen when you enter a zip code if this information is associated. Do you want to associate this data?" -msgstr "" - -#. module: l10n_es_toponyms -#: help:config.es.toponyms,city_info:0 -msgid "Do you want to add city and state information associated to the zip codes for all the spanish cities? This allows to fill automatically the city and states fields of partner and contact forms from the zip code." +msgid "Spanish states and cities configuration" msgstr "" #. module: l10n_es_toponyms @@ -41,13 +31,8 @@ msgid "Configure" msgstr "" #. module: l10n_es_toponyms -#: view:config.es.toponyms:0 -msgid "title" -msgstr "" - -#. module: l10n_es_toponyms -#: view:config.es.toponyms:0 -msgid "Spanish states and cities configuration" +#: selection:config.es.toponyms,city_info:0 +msgid "No" msgstr "" #. module: l10n_es_toponyms @@ -56,48 +41,43 @@ msgid "config.es.toponyms" msgstr "" #. module: l10n_es_toponyms -#: field:config.es.toponyms,state:0 -msgid "State names" +#: selection:config.es.toponyms,state:0 +msgid "Official" msgstr "" #. module: l10n_es_toponyms #: view:config.es.toponyms:0 -msgid "Associate city and state information to zip codes" -msgstr "" - -#. module: l10n_es_toponyms -#: model:ir.actions.act_window,name:l10n_es_toponyms.action_config_toponyms_es_form -msgid "Spanish toponyms configuration" +msgid "For example: Official (Girona), Spanish (Gerona), Both (Gerona / Girona)" msgstr "" #. module: l10n_es_toponyms -#: selection:config.es.toponyms,state:0 -msgid "Both" +#: field:config.es.toponyms,city_info:0 +msgid "City information" msgstr "" #. module: l10n_es_toponyms -#: field:config.es.toponyms,name:0 -msgid "Name" +#: view:config.es.toponyms:0 +msgid "'State', 'City', 'ZIP' and 'Country' fields can be filled automatically in partner, contact and company screens when you enter a zip code or the city name if this information is associated. Do you want to associate this data?" msgstr "" #. module: l10n_es_toponyms #: view:config.es.toponyms:0 -msgid "NOTE: If you are planning to install 'city' and 'l10n_es_toponyms_city' modules, this operation is not needed." +msgid "Warning! Adding more than 56000 records can take a lot of time. If you are behind a SSL proxy, check your timeout." msgstr "" #. module: l10n_es_toponyms -#: selection:config.es.toponyms,state:0 -msgid "Official" +#: field:config.es.toponyms,state:0 +msgid "State names" msgstr "" #. module: l10n_es_toponyms #: view:config.es.toponyms:0 -msgid "For example: Official (Girona), Spanish (Gerona), Both (Gerona / Girona)" +msgid "title" msgstr "" #. module: l10n_es_toponyms -#: field:config.es.toponyms,city_info:0 -msgid "City information" +#: selection:config.es.toponyms,state:0 +msgid "Spanish" msgstr "" #. module: l10n_es_toponyms @@ -106,18 +86,18 @@ msgid "You can select the toponym version of the spanish states and add the span msgstr "" #. module: l10n_es_toponyms -#: help:config.es.toponyms,state:0 -msgid "Toponym version of the spanish states. For example: Official (Girona), Spanish (Gerona), Both (Gerona / Girona)" +#: view:config.es.toponyms:0 +msgid "Select the toponym version of the spanish states" msgstr "" #. module: l10n_es_toponyms #: view:config.es.toponyms:0 -msgid "Select the toponym version of the spanish states" +msgid "Associate city and state information to zip codes" msgstr "" #. module: l10n_es_toponyms -#: selection:config.es.toponyms,state:0 -msgid "Spanish" +#: model:ir.actions.act_window,name:l10n_es_toponyms.action_config_toponyms_es_form +msgid "Spanish toponyms configuration" msgstr "" #. module: l10n_es_toponyms @@ -125,3 +105,8 @@ msgstr "" msgid "Yes" msgstr "" +#. module: l10n_es_toponyms +#: field:config.es.toponyms,name:0 +msgid "Name" +msgstr "" + diff --git a/l10n_es_toponyms/images/l10n_es_toponyms_config.png b/l10n_es_toponyms/images/l10n_es_toponyms_config.png index 59dc7116db9..f72f4599774 100644 Binary files a/l10n_es_toponyms/images/l10n_es_toponyms_config.png and b/l10n_es_toponyms/images/l10n_es_toponyms_config.png differ diff --git a/l10n_es_toponyms/wizard/l10n_es_toponyms_wizard.py b/l10n_es_toponyms/wizard/l10n_es_toponyms_wizard.py index 4ca8f559d21..61e062f7d5b 100644 --- a/l10n_es_toponyms/wizard/l10n_es_toponyms_wizard.py +++ b/l10n_es_toponyms/wizard/l10n_es_toponyms_wizard.py @@ -33,8 +33,8 @@ class config_es_toponyms(osv.osv_memory): _columns = { 'name':fields.char('Name', size=64), - 'state': fields.selection([('official','Official'),('spanish','Spanish'),('both','Both')], 'State names', required=True, help="Toponym version of the spanish states. For example: Official (Girona), Spanish (Gerona), Both (Gerona / Girona)"), - 'city_info': fields.selection([('yes','Yes'),('no','No')], 'City information', required=True, help="Do you want to add city and state information associated to the zip codes for all the spanish cities? This allows to fill automatically the city and states fields of partner and contact forms from the zip code."), + 'state': fields.selection([('official','Official'),('spanish','Spanish'),('both','Both')], 'State names', required=True), + 'city_info': fields.selection([('yes','Yes'),('no','No')], 'City information', required=True), } _defaults={ @@ -43,7 +43,7 @@ class config_es_toponyms(osv.osv_memory): } def create_states(self, cr, uid, state_type, context=None): - """It imports spanish states information trough an XML file.""" + """Import spanish states information through an XML file.""" file_name = 'l10n_es_toponyms_states_%s.xml' %state_type try: fp = tools.file_open(os.path.join('l10n_es_toponyms', os.path.join('wizard', file_name))) @@ -57,19 +57,18 @@ def create_states(self, cr, uid, state_type, context=None): return False def create_zipcodes(self, cr, uid, context=None): - """It creates default values for state and city fields in res.partner model linked to zip codes (>15000 zip codes can take several minutes).""" - from municipios_cpostal import cod_postales - - country_id = self.pool.get('res.country').search(cr, uid, [('code', '=', 'ES'),])[0] - if country_id: - ir_values_obj = self.pool.get('ir.values') - for city in cod_postales: - state_id = self.pool.get('res.country.state').search(cr, uid, [('country_id', '=', country_id), ('code', '=', city[0][:2]),])[0] - if state_id: - ir_values_obj.set(cr, uid, 'default', 'zip=' + city[0], 'state_id', [('res.partner', False)], state_id) - ir_values_obj.set(cr, uid, 'default', 'zip=' + city[0], 'city', [('res.partner', False)], city[1]) - cr.commit() - return {} + """Import spanish zipcodes information through an XML file.""" + file_name = 'l10n_es_toponyms_zipcodes.xml' + try: + fp = tools.file_open(os.path.join('l10n_es_toponyms', os.path.join('wizard', file_name))) + except IOError, e: + fp = None + if fp: + idref = {} + tools.convert_xml_import(cr, 'l10n_es_toponyms', fp, idref, 'init', noupdate=True) + cr.commit() + return True + return False def execute(self, cr, uid, ids, context=None): if context is None: context = {} diff --git a/l10n_es_toponyms/wizard/l10n_es_toponyms_wizard.xml b/l10n_es_toponyms/wizard/l10n_es_toponyms_wizard.xml index 12c2a38ae32..6c92301d0dc 100644 --- a/l10n_es_toponyms/wizard/l10n_es_toponyms_wizard.xml +++ b/l10n_es_toponyms/wizard/l10n_es_toponyms_wizard.xml @@ -19,10 +19,9 @@