diff --git a/l10n_es_partner/gen_src/gen_data_banks.py b/l10n_es_partner/gen_src/gen_data_banks.py index 851b121fb07..2f8bb26ed86 100644 --- a/l10n_es_partner/gen_src/gen_data_banks.py +++ b/l10n_es_partner/gen_src/gen_data_banks.py @@ -3,12 +3,12 @@ # # OpenERP, Open Source Management Solution # Copyright (c) 2014 Factor Libre S.L (http://www.factorlibre.com) -# Ismael Calvo +# Ismael Calvo # $Id$ # # This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU Affero General Public License as published by -# the Free Software Foundation, either version 3 of the License, or +# it under the terms of the GNU Affero General Public License as published +# by the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, @@ -35,7 +35,8 @@ sheet = book.sheet_by_index(0) # Prepara el archivo resultante - output = codecs.open("../wizard/data_banks.xml", mode='w', encoding='utf-8') + output = codecs.open("../wizard/data_banks.xml", mode='w', + encoding='utf-8') output.write("\n") output.write("\n") output.write(" \n") @@ -43,20 +44,33 @@ # Genera los nuevos registros de los bancos for row_index in range(1, sheet.nrows): row = sheet.row_values(row_index) - name = row[40].lower().replace(' ', '_').replace(u'\xf1', 'n') - output.write(' \n' %name) - output.write(' %s\n' %row[40]) - output.write(' %s\n' %row[4]) - output.write(' %s\n' %row[1]) - output.write(' %s\n' %row[6]) - output.write(' %s\n' %(row[7]+'. '+row[8]+', '+row[9]+' '+row[10])) - output.write(' %s\n' %row[12]) - output.write(' %s\n' %row[11]) - output.write(' %s\n' %row[16]) - output.write(' %s\n' %row[18]) + name = "city_bank_" + row[40].lower().replace( + ' ', '_').replace(u'\xf1', 'n') + street = row[7] + '. ' + row[8] + ', ' + row[9] + ' ' + row[10] + output.write(' \n' % name) + output.write(' %s\n' % ( + row[40])) + output.write(' %s\n' % ( + row[4])) + output.write(' %s\n' % ( + row[1])) + output.write(' %s\n' % ( + row[6])) + output.write(' %s\n' % ( + street)) + output.write(' %s\n' % ( + row[12])) + output.write(' %s\n' % ( + row[11])) + output.write(' ' + '%s\n' % row[16]) + output.write(' %s\n' % ( + row[18])) output.write(' \n') - output.write(' \n') - output.write(' \n') + output.write(' \n') + output.write(' \n') output.write(' \n') output.write(" \n") output.write("\n")