Merge lp:~acysos-team/openerp-spain/openerp-spain-6.0 into lp:~openerp-spain-team/openerp-spain/6.0
- openerp-spain-6.0
- Merge into 6.0
Status: | Merged |
---|---|
Merged at revision: | 337 |
Proposed branch: | lp:~acysos-team/openerp-spain/openerp-spain-6.0 |
Merge into: | lp:~openerp-spain-team/openerp-spain/6.0 |
Diff against target: |
2896 lines (+823/-847) 16 files modified
l10n_es_payment_order/__init__.py (+2/-0) l10n_es_payment_order/__openerp__.py (+12/-2) l10n_es_payment_order/i18n/es.po (+217/-339) l10n_es_payment_order/remesas_data.xml (+4/-4) l10n_es_payment_order/remesas_view.xml (+1/-1) l10n_es_payment_order/security/ir.model.access.csv (+13/-0) l10n_es_payment_order/wizard/__init__.py (+10/-0) l10n_es_payment_order/wizard/converter.py (+83/-90) l10n_es_payment_order/wizard/csb_19.py (+49/-44) l10n_es_payment_order/wizard/csb_32.py (+59/-53) l10n_es_payment_order/wizard/csb_34.py (+79/-74) l10n_es_payment_order/wizard/csb_34_01.py (+36/-29) l10n_es_payment_order/wizard/csb_58.py (+44/-38) l10n_es_payment_order/wizard/export_remesas.py (+129/-173) l10n_es_payment_order/wizard/export_remesas_view.xml (+40/-0) l10n_es_payment_order/wizard/log.py (+45/-0) |
To merge this branch: | bzr merge lp:~acysos-team/openerp-spain/openerp-spain-6.0 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ignacio Ibeas (www.acysos.com) | Approve | ||
Review via email: mp+142078@code.launchpad.net |
Commit message
[FIX] l10n_es_
Description of the change
Se ha eliminado todo el código que quedaba de OpenERP 5.0 a partir de los
cambios que realizo Pexego en el wizard para OpenERP 6.1. Este cambio hace que
99% del codigo del módulo sea igual para OpenERP 6.0 y 6.1 a diferencia de
una vista que ha cambiado en OpenERP 6.1 pero que solo afecta a una línea
(línea 26 de remesa_view.xml).
El resto del código es exactamente igual para ambas versiones. Esto facilita
mucho el mantenimiento.
Se ha modificado todas las clases de los cuadernos y del converter,
convirtiendolas en clases del OSV y, por lo tanto, permitiendo la herencia de
OpenERP.
Joan M. Grande (totaler) wrote : | # |
- 338. By Ignacio Ibeas (www.acysos.com)
-
[FIX] l10n_es_
payment_ order: fix auto = False en el converter - 339. By Ignacio Ibeas (www.acysos.com)
-
[FIX] l10n_es_
payment_ order: fix auto = False en las clases que no necesitan tablas
Ignacio Ibeas (www.acysos.com) (ignacio-acysos) wrote : | # |
Hola,
Ya esta añadido el _auto = False a todas las clases que no necesitan tablas.
Respecto a PEP8, tendrá que ser en otra revisión, ahora creo que es urgente tener un módulo que no tenga restos de OpenERP 5.0 y que permita herencia, para el desarrollo de nuevos módulos.
Saludos,
Ignacio Ibeas
Ignacio Ibeas (www.acysos.com) (ignacio-acysos) wrote : | # |
Como veo que no hay más comentario procedo a hacer el merge.
Saludos
Ignacio Ibeas (www.acysos.com) (ignacio-acysos) : | # |
- 340. By Ignacio Ibeas (www.acysos.com)
-
Merge: actulizar cambios
Preview Diff
1 | === modified file 'l10n_es_payment_order/__init__.py' | |||
2 | --- l10n_es_payment_order/__init__.py 2011-08-29 15:11:11 +0000 | |||
3 | +++ l10n_es_payment_order/__init__.py 2013-01-11 10:23:22 +0000 | |||
4 | @@ -7,6 +7,8 @@ | |||
5 | 7 | # Copyright (c) 2008 Pablo Rocandio. All Rights Reserved. | 7 | # Copyright (c) 2008 Pablo Rocandio. All Rights Reserved. |
6 | 8 | # Copyright (c) 2009 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved. | 8 | # Copyright (c) 2009 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved. |
7 | 9 | # Jordi Esteve <jesteve@zikzakmedia.com> | 9 | # Jordi Esteve <jesteve@zikzakmedia.com> |
8 | 10 | # AvanzOSC, Advanced Open Source Consulting | ||
9 | 11 | # Copyright (C) 2011-2012 Ainara Galdona (www.avanzosc.com). All Rights Reserved | ||
10 | 10 | # $Id$ | 12 | # $Id$ |
11 | 11 | # | 13 | # |
12 | 12 | # This program is free software: you can redistribute it and/or modify | 14 | # This program is free software: you can redistribute it and/or modify |
13 | 13 | 15 | ||
14 | === modified file 'l10n_es_payment_order/__openerp__.py' | |||
15 | --- l10n_es_payment_order/__openerp__.py 2012-03-03 11:14:30 +0000 | |||
16 | +++ l10n_es_payment_order/__openerp__.py 2013-01-11 10:23:22 +0000 | |||
17 | @@ -7,8 +7,13 @@ | |||
18 | 7 | # Copyright (c) 2008 Acysos SL. All Rights Reserved. | 7 | # Copyright (c) 2008 Acysos SL. All Rights Reserved. |
19 | 8 | # Ignacio Ibeas <ignacio@acysos.com> | 8 | # Ignacio Ibeas <ignacio@acysos.com> |
20 | 9 | # Copyright (c) 2008 Pablo Rocandio. All Rights Reserved. | 9 | # Copyright (c) 2008 Pablo Rocandio. All Rights Reserved. |
21 | 10 | # AvanzOSC, Advanced Open Source Consulting | ||
22 | 11 | # Copyright (C) 2011-2012 Ainara Galdona (www.avanzosc.com). All Rights Reserved | ||
23 | 10 | # $Id$ | 12 | # $Id$ |
24 | 11 | # | 13 | # |
25 | 14 | # Refactorización. Acysos S.L. (http://www.acysos.com) 2012 | ||
26 | 15 | # Ignacio Ibeas <ignacio@acysos.com> | ||
27 | 16 | # | ||
28 | 12 | # This program is free software: you can redistribute it and/or modify | 17 | # This program is free software: you can redistribute it and/or modify |
29 | 13 | # it under the terms of the GNU Affero General Public License as published by | 18 | # it under the terms of the GNU Affero General Public License as published by |
30 | 14 | # the Free Software Foundation, either version 3 of the License, or | 19 | # the Free Software Foundation, either version 3 of the License, or |
31 | @@ -26,7 +31,7 @@ | |||
32 | 26 | 31 | ||
33 | 27 | { | 32 | { |
34 | 28 | "name" : "Exportación de ficheros bancarios CSB 19, CSB 32, CSB 34 y CSB 58", | 33 | "name" : "Exportación de ficheros bancarios CSB 19, CSB 32, CSB 34 y CSB 58", |
36 | 29 | "version" : "1.5", | 34 | "version" : "1.6", |
37 | 30 | "author" : "Acysos SL, Zikzakmedia SL, Pablo Rocandio, NaN·tic", | 35 | "author" : "Acysos SL, Zikzakmedia SL, Pablo Rocandio, NaN·tic", |
38 | 31 | "category" : "Localisation/Accounting", | 36 | "category" : "Localisation/Accounting", |
39 | 32 | "description" : """Módulo para la exportación de ficheros bancarios según las normas CSB 19 (recibos domiciliados), CBS 32 (descuento comercial), CSB 58 (anticipos de créditos) y CSB 34 (emisión de transferencias, nóminas, cheques, pagarés y pagos certificados) para poder ser enviados a la entidad bancaria. | 37 | "description" : """Módulo para la exportación de ficheros bancarios según las normas CSB 19 (recibos domiciliados), CBS 32 (descuento comercial), CSB 58 (anticipos de créditos) y CSB 34 (emisión de transferencias, nóminas, cheques, pagarés y pagos certificados) para poder ser enviados a la entidad bancaria. |
40 | @@ -49,7 +54,12 @@ | |||
41 | 49 | "depends" : ["base", "account", "account_payment_extension",], | 54 | "depends" : ["base", "account", "account_payment_extension",], |
42 | 50 | "init_xml" : ["remesas_data.xml"], | 55 | "init_xml" : ["remesas_data.xml"], |
43 | 51 | "demo_xml" : [], | 56 | "demo_xml" : [], |
45 | 52 | "update_xml" : ["remesas_report.xml", "remesas_view.xml", "remesas_wizard.xml",], | 57 | "update_xml" : [ |
46 | 58 | "remesas_report.xml", | ||
47 | 59 | "remesas_view.xml", | ||
48 | 60 | "wizard/export_remesas_view.xml", | ||
49 | 61 | "security/ir.model.access.csv" | ||
50 | 62 | ], | ||
51 | 53 | "installable" : True, | 63 | "installable" : True, |
52 | 54 | "active" : False, | 64 | "active" : False, |
53 | 55 | } | 65 | } |
54 | 56 | 66 | ||
55 | === modified file 'l10n_es_payment_order/i18n/es.po' | |||
56 | --- l10n_es_payment_order/i18n/es.po 2011-08-03 15:44:39 +0000 | |||
57 | +++ l10n_es_payment_order/i18n/es.po 2013-01-11 10:23:22 +0000 | |||
58 | @@ -1,67 +1,29 @@ | |||
59 | 1 | # Translation of OpenERP Server. | 1 | # Translation of OpenERP Server. |
60 | 2 | # This file contains the translation of the following modules: | 2 | # This file contains the translation of the following modules: |
62 | 3 | # * l10n_ES_remesas | 3 | # * l10n_es_payment_order |
63 | 4 | # | 4 | # |
64 | 5 | msgid "" | 5 | msgid "" |
65 | 6 | msgstr "" | 6 | msgstr "" |
71 | 7 | "Project-Id-Version: OpenERP Server 5.0.15\n" | 7 | "Project-Id-Version: OpenERP Server 6.1\n" |
72 | 8 | "Report-Msgid-Bugs-To: support@openerp.com\n" | 8 | "Report-Msgid-Bugs-To: \n" |
73 | 9 | "POT-Creation-Date: 2011-05-24 11:11+0000\n" | 9 | "POT-Creation-Date: 2012-09-03 00:18+0000\n" |
74 | 10 | "PO-Revision-Date: 2011-05-24 13:34+0100\n" | 10 | "PO-Revision-Date: 2012-09-03 00:18+0000\n" |
75 | 11 | "Last-Translator: Jesús Martín <jmartin@zikzakmedia.com>\n" | 11 | "Last-Translator: <>\n" |
76 | 12 | "Language-Team: \n" | 12 | "Language-Team: \n" |
77 | 13 | "MIME-Version: 1.0\n" | 13 | "MIME-Version: 1.0\n" |
78 | 14 | "Content-Type: text/plain; charset=UTF-8\n" | 14 | "Content-Type: text/plain; charset=UTF-8\n" |
80 | 15 | "Content-Transfer-Encoding: 8bit\n" | 15 | "Content-Transfer-Encoding: \n" |
81 | 16 | "Plural-Forms: \n" | 16 | "Plural-Forms: \n" |
82 | 17 | 17 | ||
83 | 18 | #. module: l10n_es_payment_order | 18 | #. module: l10n_es_payment_order |
84 | 19 | #: report:remesas.report:0 | ||
85 | 20 | msgid "Matur. date" | ||
86 | 21 | msgstr "Fecha de vencimiento" | ||
87 | 22 | |||
88 | 23 | #. module: l10n_es_payment_order | ||
89 | 24 | #: selection:payment.mode,tipo:0 | 19 | #: selection:payment.mode,tipo:0 |
90 | 25 | msgid "CSB 19" | 20 | msgid "CSB 19" |
91 | 26 | msgstr "CSB 19" | 21 | msgstr "CSB 19" |
92 | 27 | 22 | ||
93 | 28 | #. module: l10n_es_payment_order | 23 | #. module: l10n_es_payment_order |
130 | 29 | #: model:ir.module.module,description:l10n_es_payment_order.module_meta_information | 24 | #: field:payment.mode,send_type:0 |
131 | 30 | msgid "" | 25 | msgid "Send Type" |
132 | 31 | "Módulo para la exportación de ficheros bancarios según las normas CSB 19 (recibos domiciliados), CBS 32 (descuento comercial), CSB 58 (anticipos de créditos) y CSB 34 (emisión de transferencias, nóminas, cheques, pagarés y pagos certificados) para poder ser enviados a la entidad bancaria.\n" | 26 | msgstr "Tipo de envío" |
97 | 32 | "\n" | ||
98 | 33 | "Crea un tipo de pago \"Recibo domiciliado\" con el código RECIBO_CSB. Este código es importante pues permite ejecutar el asistente de creación del fichero de remesas cuando se presiona el botón \"Realizar pagos\" en la orden de pagos o remesa.\n" | ||
99 | 34 | "\n" | ||
100 | 35 | "También crea los tipos de pago \"Transferencia\" (TRANSFERENCIA_CSB), \"Pagaré\" (PAGARE_CSB), \"Cheque\" (CHEQUE_CSB), \"Pago certificado\" (PAGO_CERTIFICADO_CSB).\n" | ||
101 | 36 | "\n" | ||
102 | 37 | "Antes de generar un fichero bancario CSB habrá que definir un modo de pago que use el tipo de pago anterior y donde se defina la forma de pago (CSB 19, CSB 32, CSB 34 o CSB 58), la compañía que emite el fichero y el sufijo y nombre de compañia a incluir en el fichero.\n" | ||
103 | 38 | "\n" | ||
104 | 39 | "Al crear el fichero bancario CSB:\n" | ||
105 | 40 | "\n" | ||
106 | 41 | " * Se pueden agrupar o no los pagos de una misma empresa y cuenta bancaria\n" | ||
107 | 42 | " * El fichero creado se guarda como adjunto de la orden de pagos. Se puede volver a crear el fichero de remesas siempre que sea necesario (puede tener que renombrar el anterior fichero adjunto si tienen el mismo nombre).\n" | ||
108 | 43 | "\n" | ||
109 | 44 | "También se proporciona un informe para imprimir un listado de los pagos/cobros de la orden de pago/cobro (remesa).\n" | ||
110 | 45 | msgstr "" | ||
111 | 46 | "Módulo para la exportación de ficheros bancarios según las normas CSB 19 (recibos domiciliados), CBS 32 (descuento comercial), CSB 58 (anticipos de créditos) y CSB 34 (emisión de transferencias, nóminas, cheques, pagarés y pagos certificados) para poder ser enviados a la entidad bancaria.\n" | ||
112 | 47 | "\n" | ||
113 | 48 | "Crea un tipo de pago \"Recibo domiciliado\" con el código RECIBO_CSB. Este código es importante pues permite ejecutar el asistente de creación del fichero de remesas cuando se presiona el botón \"Realizar pagos\" en la orden de pagos o remesa.\n" | ||
114 | 49 | "\n" | ||
115 | 50 | "También crea los tipos de pago \"Transferencia\" (TRANSFERENCIA_CSB), \"Pagaré\" (PAGARE_CSB), \"Cheque\" (CHEQUE_CSB), \"Pago certificado\" (PAGO_CERTIFICADO_CSB).\n" | ||
116 | 51 | "\n" | ||
117 | 52 | "Antes de generar un fichero bancario CSB habrá que definir un modo de pago que use el tipo de pago anterior y donde se defina la forma de pago (CSB 19, CSB 32, CSB 34 o CSB 58), la compañía que emite el fichero y el sufijo y nombre de compañia a incluir en el fichero.\n" | ||
118 | 53 | "\n" | ||
119 | 54 | "Al crear el fichero bancario CSB:\n" | ||
120 | 55 | "\n" | ||
121 | 56 | " * Se pueden agrupar o no los pagos de una misma empresa y cuenta bancaria\n" | ||
122 | 57 | " * El fichero creado se guarda como adjunto de la orden de pagos. Se puede volver a crear el fichero de remesas siempre que sea necesario (puede tener que renombrar el anterior fichero adjunto si tienen el mismo nombre).\n" | ||
123 | 58 | "\n" | ||
124 | 59 | "También se proporciona un informe para imprimir un listado de los pagos/cobros de la orden de pago/cobro (remesa).\n" | ||
125 | 60 | |||
126 | 61 | #. module: l10n_es_payment_order | ||
127 | 62 | #: help:payment.mode,send_type:0 | ||
128 | 63 | msgid "The sending type of the payment file" | ||
129 | 64 | msgstr "El tipos de envío del archivo de pago" | ||
133 | 65 | 27 | ||
134 | 66 | #. module: l10n_es_payment_order | 28 | #. module: l10n_es_payment_order |
135 | 67 | #: field:payment.mode,add_date:0 | 29 | #: field:payment.mode,add_date:0 |
136 | @@ -79,14 +41,17 @@ | |||
137 | 79 | msgstr "CIF" | 41 | msgstr "CIF" |
138 | 80 | 42 | ||
139 | 81 | #. module: l10n_es_payment_order | 43 | #. module: l10n_es_payment_order |
140 | 44 | #: view:wizard.payment.file.spain:0 | ||
141 | 45 | msgid "_Export" | ||
142 | 46 | msgstr "_Exportar" | ||
143 | 47 | |||
144 | 48 | #. module: l10n_es_payment_order | ||
145 | 82 | #: code:addons/l10n_es_payment_order/wizard/converter.py:71 | 49 | #: code:addons/l10n_es_payment_order/wizard/converter.py:71 |
146 | 83 | #, python-format | 50 | #, python-format |
149 | 84 | msgid "" | 51 | msgid "Error:\n" |
148 | 85 | "Error:\n" | ||
150 | 86 | "\n" | 52 | "\n" |
151 | 87 | "Can not convert float number %(number).2f to fit in %(size)d characters." | 53 | "Can not convert float number %(number).2f to fit in %(size)d characters." |
154 | 88 | msgstr "" | 54 | msgstr "Error:\n" |
153 | 89 | "Error:\n" | ||
155 | 90 | "\n" | 55 | "\n" |
156 | 91 | "No se puede convertir el número %(number).2f para que quepa en %(size)d caracteres." | 56 | "No se puede convertir el número %(number).2f para que quepa en %(size)d caracteres." |
157 | 92 | 57 | ||
158 | @@ -111,49 +76,34 @@ | |||
159 | 111 | msgstr "Cedente" | 76 | msgstr "Cedente" |
160 | 112 | 77 | ||
161 | 113 | #. module: l10n_es_payment_order | 78 | #. module: l10n_es_payment_order |
194 | 114 | #: code:addons/l10n_es_payment_order/wizard/export_remesas.py:151 | 79 | #: model:ir.model,name:l10n_es_payment_order.model_wizard_payment_file_export_spain |
195 | 115 | #, python-format | 80 | msgid "Pay file export spain" |
196 | 116 | msgid "" | 81 | msgstr "Pay file export spain" |
197 | 117 | "User error:\n" | 82 | |
198 | 118 | "\n" | 83 | #. module: l10n_es_payment_order |
199 | 119 | "The payment mode is not CSB 19, CSB 32, CSB 34 or CSB 58" | 84 | #: model:ir.model,name:l10n_es_payment_order.model_wizard_payment_file_spain |
200 | 120 | msgstr "" | 85 | msgid "wizard.payment.file.spain" |
201 | 121 | "Error del usuario:\n" | 86 | msgstr "wizard.payment.file.spain" |
202 | 122 | "\n" | 87 | |
203 | 123 | "El modo de pago no es CSB 19, CSB 32, CSB 34 ni CSB 58" | 88 | #. module: l10n_es_payment_order |
204 | 124 | 89 | #: field:payment.mode,not_to_the_order:0 | |
205 | 125 | #. module: l10n_es_payment_order | 90 | msgid "Not to the Order" |
206 | 126 | #: report:remesas.report:0 | 91 | msgstr "No a la orden" |
207 | 127 | msgid "Account:" | 92 | |
208 | 128 | msgstr "C.C.:" | 93 | #. module: l10n_es_payment_order |
209 | 129 | 94 | #: code:addons/l10n_es_payment_order/wizard/export_remesas.py:129 | |
210 | 130 | #. module: l10n_es_payment_order | 95 | #, python-format |
211 | 131 | #: selection:payment.mode,cost_key:0 | 96 | msgid "User error:\n" |
180 | 132 | msgid "Expense of the Recipient" | ||
181 | 133 | msgstr "Gastos por cuenta del beneficiario" | ||
182 | 134 | |||
183 | 135 | #. module: l10n_es_payment_order | ||
184 | 136 | #: wizard_button:export_payment_file_spain,export,end:0 | ||
185 | 137 | #: wizard_button:export_payment_file_spain,init,export:0 | ||
186 | 138 | msgid "Ok" | ||
187 | 139 | msgstr "Aceptar" | ||
188 | 140 | |||
189 | 141 | #. module: l10n_es_payment_order | ||
190 | 142 | #: code:addons/l10n_es_payment_order/wizard/export_remesas.py:140 | ||
191 | 143 | #, python-format | ||
192 | 144 | msgid "" | ||
193 | 145 | "User error:\n" | ||
212 | 146 | "\n" | 97 | "\n" |
213 | 147 | "The bank account number of the customer %s has not 20 digits." | 98 | "The bank account number of the customer %s has not 20 digits." |
216 | 148 | msgstr "" | 99 | msgstr "Error del usuario:\n" |
215 | 149 | "Error del usuario:\n" | ||
217 | 150 | "\n" | 100 | "\n" |
218 | 151 | "El número de C.C. del cliente %s no tiene 20 dígitos." | 101 | "El número de C.C. del cliente %s no tiene 20 dígitos." |
219 | 152 | 102 | ||
220 | 153 | #. module: l10n_es_payment_order | 103 | #. module: l10n_es_payment_order |
222 | 154 | #: wizard_field:export_payment_file_spain,export,pay_fname:0 | 104 | #: field:wizard.payment.file.spain,pay_fname:0 |
223 | 155 | msgid "File name" | 105 | msgid "File name" |
225 | 156 | msgstr "Nombre del fichero" | 106 | msgstr "Nombre Fichero" |
226 | 157 | 107 | ||
227 | 158 | #. module: l10n_es_payment_order | 108 | #. module: l10n_es_payment_order |
228 | 159 | #: help:payment.mode,concept:0 | 109 | #: help:payment.mode,concept:0 |
229 | @@ -161,19 +111,14 @@ | |||
230 | 161 | msgstr "Concepto de la orden." | 111 | msgstr "Concepto de la orden." |
231 | 162 | 112 | ||
232 | 163 | #. module: l10n_es_payment_order | 113 | #. module: l10n_es_payment_order |
233 | 164 | #: model:ir.actions.report.xml,name:l10n_es_payment_order.remesas_report | ||
234 | 165 | msgid "Remesa" | ||
235 | 166 | msgstr "Remesa" | ||
236 | 167 | |||
237 | 168 | #. module: l10n_es_payment_order | ||
238 | 169 | #: field:payment.mode,barred:0 | 114 | #: field:payment.mode,barred:0 |
239 | 170 | msgid "Barred" | 115 | msgid "Barred" |
240 | 171 | msgstr "Barrado" | 116 | msgstr "Barrado" |
241 | 172 | 117 | ||
242 | 173 | #. module: l10n_es_payment_order | 118 | #. module: l10n_es_payment_order |
246 | 174 | #: field:payment.mode,send_type:0 | 119 | #: help:payment.mode,send_type:0 |
247 | 175 | msgid "Send Type" | 120 | msgid "The sending type of the payment file" |
248 | 176 | msgstr "Tipo de envío" | 121 | msgstr "El tipos de envío del archivo de pago" |
249 | 177 | 122 | ||
250 | 178 | #. module: l10n_es_payment_order | 123 | #. module: l10n_es_payment_order |
251 | 179 | #: help:payment.mode,direct_pay_order:0 | 124 | #: help:payment.mode,direct_pay_order:0 |
252 | @@ -181,14 +126,12 @@ | |||
253 | 181 | msgstr "Por defecto 'No'." | 126 | msgstr "Por defecto 'No'." |
254 | 182 | 127 | ||
255 | 183 | #. module: l10n_es_payment_order | 128 | #. module: l10n_es_payment_order |
257 | 184 | #: code:addons/l10n_es_payment_order/wizard/export_remesas.py:137 | 129 | #: code:addons/l10n_es_payment_order/wizard/export_remesas.py:126 |
258 | 185 | #, python-format | 130 | #, python-format |
261 | 186 | msgid "" | 131 | msgid "User error:\n" |
260 | 187 | "User error:\n" | ||
262 | 188 | "\n" | 132 | "\n" |
263 | 189 | "The bank account number of the customer %s is not defined and current payment mode enforces all lines to have a bank account." | 133 | "The bank account number of the customer %s is not defined and current payment mode enforces all lines to have a bank account." |
266 | 190 | msgstr "" | 134 | msgstr "Error del usuario:\n" |
265 | 191 | "Error del usuario:\n" | ||
267 | 192 | "\n" | 135 | "\n" |
268 | 193 | "La empresa %s no tiene definida ninguna cuenta bancaria y la forma de pago actual fuerza que todas las líneas tengan asignada una cuenta bancaria." | 136 | "La empresa %s no tiene definida ninguna cuenta bancaria y la forma de pago actual fuerza que todas las líneas tengan asignada una cuenta bancaria." |
269 | 194 | 137 | ||
270 | @@ -200,12 +143,10 @@ | |||
271 | 200 | #. module: l10n_es_payment_order | 143 | #. module: l10n_es_payment_order |
272 | 201 | #: code:addons/l10n_es_payment_order/wizard/converter.py:98 | 144 | #: code:addons/l10n_es_payment_order/wizard/converter.py:98 |
273 | 202 | #, python-format | 145 | #, python-format |
276 | 203 | msgid "" | 146 | msgid "User error:\n" |
275 | 204 | "User error:\n" | ||
277 | 205 | "\n" | 147 | "\n" |
278 | 206 | "The bank account number of %s is not defined." | 148 | "The bank account number of %s is not defined." |
281 | 207 | msgstr "" | 149 | msgstr "Error del usuario:\n" |
280 | 208 | "Error del usuario:\n" | ||
282 | 209 | "\n" | 150 | "\n" |
283 | 210 | "El número de C.C. del cliente %s no existe." | 151 | "El número de C.C. del cliente %s no existe." |
284 | 211 | 152 | ||
285 | @@ -215,31 +156,19 @@ | |||
286 | 215 | msgstr "Pagaré" | 156 | msgstr "Pagaré" |
287 | 216 | 157 | ||
288 | 217 | #. module: l10n_es_payment_order | 158 | #. module: l10n_es_payment_order |
295 | 218 | #: report:remesas.report:0 | 159 | #: code:addons/l10n_es_payment_order/wizard/export_remesas.py:73 |
290 | 219 | msgid "Payment date:" | ||
291 | 220 | msgstr "Fecha cargo:" | ||
292 | 221 | |||
293 | 222 | #. module: l10n_es_payment_order | ||
294 | 223 | #: code:addons/l10n_es_payment_order/wizard/export_remesas.py:87 | ||
296 | 224 | #, python-format | 160 | #, python-format |
299 | 225 | msgid "" | 161 | msgid "User error:\n" |
298 | 226 | "User error:\n" | ||
300 | 227 | "\n" | 162 | "\n" |
301 | 228 | "The bank account of the company %s is not defined." | 163 | "The bank account of the company %s is not defined." |
304 | 229 | msgstr "" | 164 | msgstr "Error del usuario:\n" |
303 | 230 | "Error del usuario:\n" | ||
305 | 231 | "\n" | 165 | "\n" |
306 | 232 | "No se ha definido el C.C. de la compañía %s." | 166 | "No se ha definido el C.C. de la compañía %s." |
307 | 233 | 167 | ||
308 | 234 | #. module: l10n_es_payment_order | 168 | #. module: l10n_es_payment_order |
317 | 235 | #: selection:payment.mode,csb34_type:0 | 169 | #: model:payment.type,name:l10n_es_payment_order.payment_type_giro0 |
318 | 236 | msgid "Transfer" | 170 | msgid "Giiro" |
319 | 237 | msgstr "Transferencia" | 171 | msgstr "Giro" |
312 | 238 | |||
313 | 239 | #. module: l10n_es_payment_order | ||
314 | 240 | #: field:payment.mode,ine:0 | ||
315 | 241 | msgid "INE code" | ||
316 | 242 | msgstr "Código INE" | ||
320 | 243 | 172 | ||
321 | 244 | #. module: l10n_es_payment_order | 173 | #. module: l10n_es_payment_order |
322 | 245 | #: selection:payment.mode,tipo:0 | 174 | #: selection:payment.mode,tipo:0 |
323 | @@ -247,6 +176,11 @@ | |||
324 | 247 | msgstr "CSB 32" | 176 | msgstr "CSB 32" |
325 | 248 | 177 | ||
326 | 249 | #. module: l10n_es_payment_order | 178 | #. module: l10n_es_payment_order |
327 | 179 | #: model:ir.model,name:l10n_es_payment_order.model_wizard_payment_file_join_spain | ||
328 | 180 | msgid "Pay file join spain" | ||
329 | 181 | msgstr "Pay file join spain" | ||
330 | 182 | |||
331 | 183 | #. module: l10n_es_payment_order | ||
332 | 250 | #: selection:payment.mode,tipo:0 | 184 | #: selection:payment.mode,tipo:0 |
333 | 251 | msgid "CSB 34" | 185 | msgid "CSB 34" |
334 | 252 | msgstr "CSB 34" | 186 | msgstr "CSB 34" |
335 | @@ -257,10 +191,9 @@ | |||
336 | 257 | msgstr "Modo de pago" | 191 | msgstr "Modo de pago" |
337 | 258 | 192 | ||
338 | 259 | #. module: l10n_es_payment_order | 193 | #. module: l10n_es_payment_order |
343 | 260 | #: model:payment.type,name:l10n_es_payment_order.payment_type_recibodomiciliado0 | 194 | #: selection:payment.mode,csb34_type:0 |
344 | 261 | #: model:payment.type,note:l10n_es_payment_order.payment_type_recibodomiciliado0 | 195 | msgid "Certified Payments" |
345 | 262 | msgid "Recibo domiciliado" | 196 | msgstr "Pagos certificados" |
342 | 263 | msgstr "Recibo domiciliado" | ||
346 | 264 | 197 | ||
347 | 265 | #. module: l10n_es_payment_order | 198 | #. module: l10n_es_payment_order |
348 | 266 | #: help:payment.mode,alt_domicile_format:0 | 199 | #: help:payment.mode,alt_domicile_format:0 |
349 | @@ -273,19 +206,28 @@ | |||
350 | 273 | msgstr "Datos del presentador" | 206 | msgstr "Datos del presentador" |
351 | 274 | 207 | ||
352 | 275 | #. module: l10n_es_payment_order | 208 | #. module: l10n_es_payment_order |
353 | 209 | #: field:payment.mode,csb19_extra_concepts:0 | ||
354 | 210 | msgid "Extra Concepts" | ||
355 | 211 | msgstr "Conceptos Extra" | ||
356 | 212 | |||
357 | 213 | #. module: l10n_es_payment_order | ||
358 | 276 | #: selection:payment.mode,tipo:0 | 214 | #: selection:payment.mode,tipo:0 |
359 | 277 | msgid "None" | 215 | msgid "None" |
360 | 278 | msgstr "Ninguno" | 216 | msgstr "Ninguno" |
361 | 279 | 217 | ||
362 | 280 | #. module: l10n_es_payment_order | 218 | #. module: l10n_es_payment_order |
363 | 219 | #: model:payment.type,name:l10n_es_payment_order.payment_type_recibodomiciliado0 | ||
364 | 220 | #: model:payment.type,note:l10n_es_payment_order.payment_type_recibodomiciliado0 | ||
365 | 221 | msgid "Recibo domiciliado" | ||
366 | 222 | msgstr "Recibo domiciliado" | ||
367 | 223 | |||
368 | 224 | #. module: l10n_es_payment_order | ||
369 | 281 | #: code:addons/l10n_es_payment_order/wizard/converter.py:101 | 225 | #: code:addons/l10n_es_payment_order/wizard/converter.py:101 |
370 | 282 | #, python-format | 226 | #, python-format |
373 | 283 | msgid "" | 227 | msgid "User error:\n" |
372 | 284 | "User error:\n" | ||
374 | 285 | "\n" | 228 | "\n" |
375 | 286 | "The bank account number of %s does not have 20 digits." | 229 | "The bank account number of %s does not have 20 digits." |
378 | 287 | msgstr "" | 230 | msgstr "Error del usuario:\n" |
377 | 288 | "Error del usuario:\n" | ||
379 | 289 | "\n" | 231 | "\n" |
380 | 290 | "El número de C.C. de %s no tiene 20 dígitos." | 232 | "El número de C.C. de %s no tiene 20 dígitos." |
381 | 291 | 233 | ||
382 | @@ -309,54 +251,44 @@ | |||
383 | 309 | #: code:addons/l10n_es_payment_order/wizard/csb_32.py:195 | 251 | #: code:addons/l10n_es_payment_order/wizard/csb_32.py:195 |
384 | 310 | #: code:addons/l10n_es_payment_order/wizard/csb_32.py:221 | 252 | #: code:addons/l10n_es_payment_order/wizard/csb_32.py:221 |
385 | 311 | #, python-format | 253 | #, python-format |
388 | 312 | msgid "" | 254 | msgid "Configuration error:\n" |
387 | 313 | "Configuration error:\n" | ||
389 | 314 | "\n" | 255 | "\n" |
390 | 315 | "The line \"%s\" is not 150 characters long:\n" | 256 | "The line \"%s\" is not 150 characters long:\n" |
391 | 316 | "%s" | 257 | "%s" |
394 | 317 | msgstr "" | 258 | msgstr "Error de configuración:\n" |
393 | 318 | "Error de configuración:\n" | ||
395 | 319 | "\n" | 259 | "\n" |
396 | 320 | "La línea \"%s\" no tiene 150 caracteres:\n" | 260 | "La línea \"%s\" no tiene 150 caracteres:\n" |
397 | 321 | "%s" | 261 | "%s" |
398 | 322 | 262 | ||
399 | 323 | #. module: l10n_es_payment_order | 263 | #. module: l10n_es_payment_order |
400 | 324 | #: field:payment.mode,partner_id:0 | ||
401 | 325 | #: report:remesas.report:0 | ||
402 | 326 | msgid "Partner" | ||
403 | 327 | msgstr "Empresa" | ||
404 | 328 | |||
405 | 329 | #. module: l10n_es_payment_order | ||
406 | 330 | #: code:addons/l10n_es_payment_order/wizard/csb_34.py:154 | 264 | #: code:addons/l10n_es_payment_order/wizard/csb_34.py:154 |
409 | 331 | #: code:addons/l10n_es_payment_order/wizard/csb_34.py:355 | 265 | #: code:addons/l10n_es_payment_order/wizard/csb_34.py:356 |
410 | 332 | #: code:addons/l10n_es_payment_order/wizard/csb_34.py:370 | 266 | #: code:addons/l10n_es_payment_order/wizard/csb_34.py:371 |
411 | 333 | #, python-format | 267 | #, python-format |
414 | 334 | msgid "" | 268 | msgid "Configuration error:\n" |
413 | 335 | "Configuration error:\n" | ||
415 | 336 | "\n" | 269 | "\n" |
416 | 337 | "The line \"%s\" is not 72 characters long:\n" | 270 | "The line \"%s\" is not 72 characters long:\n" |
417 | 338 | "%s" | 271 | "%s" |
420 | 339 | msgstr "" | 272 | msgstr "Error de configuración:\n" |
419 | 340 | "Error de configuración:\n" | ||
421 | 341 | "\n" | 273 | "\n" |
422 | 342 | "La línea \"%s\" no tiene 72 caracteres:\n" | 274 | "La línea \"%s\" no tiene 72 caracteres:\n" |
423 | 343 | "%s" | 275 | "%s" |
424 | 344 | 276 | ||
425 | 345 | #. module: l10n_es_payment_order | 277 | #. module: l10n_es_payment_order |
427 | 346 | #: code:addons/l10n_es_payment_order/wizard/export_remesas.py:174 | 278 | #: code:addons/l10n_es_payment_order/wizard/export_remesas.py:160 |
428 | 347 | #, python-format | 279 | #, python-format |
431 | 348 | msgid "" | 280 | msgid "Successfully Exported\n" |
430 | 349 | "Successfully Exported\n" | ||
432 | 350 | "\n" | 281 | "\n" |
433 | 351 | "Summary:\n" | 282 | "Summary:\n" |
434 | 352 | " Total amount paid: %.2f\n" | 283 | " Total amount paid: %.2f\n" |
435 | 353 | " Total Number of Payments: %d\n" | 284 | " Total Number of Payments: %d\n" |
438 | 354 | msgstr "" | 285 | "" |
439 | 355 | "Exportación realizada con éxito\n" | 286 | msgstr "Exportación realizada con éxito\n" |
440 | 356 | "\n" | 287 | "\n" |
441 | 357 | "Resumen:\n" | 288 | "Resumen:\n" |
442 | 358 | " Total importe remesa: %.2f\n" | 289 | " Total importe remesa: %.2f\n" |
443 | 359 | " Total número de recibos: %d\n" | 290 | " Total número de recibos: %d\n" |
444 | 291 | "" | ||
445 | 360 | 292 | ||
446 | 361 | #. module: l10n_es_payment_order | 293 | #. module: l10n_es_payment_order |
447 | 362 | #: field:payment.mode,text3:0 | 294 | #: field:payment.mode,text3:0 |
448 | @@ -364,14 +296,12 @@ | |||
449 | 364 | msgstr "Línea 3" | 296 | msgstr "Línea 3" |
450 | 365 | 297 | ||
451 | 366 | #. module: l10n_es_payment_order | 298 | #. module: l10n_es_payment_order |
453 | 367 | #: code:addons/l10n_es_payment_order/wizard/csb_19.py:74 | 299 | #: code:addons/l10n_es_payment_order/wizard/csb_19.py:77 |
454 | 368 | #, python-format | 300 | #, python-format |
457 | 369 | msgid "" | 301 | msgid "User error:\n" |
456 | 370 | "User error:\n" | ||
458 | 371 | "\n" | 302 | "\n" |
459 | 372 | "Fixed date of charge has not been defined." | 303 | "Fixed date of charge has not been defined." |
462 | 373 | msgstr "" | 304 | msgstr "Error del usuario:\n" |
461 | 374 | "Error del usuario:\n" | ||
463 | 375 | "\n" | 305 | "\n" |
464 | 376 | "No se ha definido una fecha fija de cargo." | 306 | "No se ha definido una fecha fija de cargo." |
465 | 377 | 307 | ||
466 | @@ -381,44 +311,55 @@ | |||
467 | 381 | msgstr "Nombre compañía para archivo" | 311 | msgstr "Nombre compañía para archivo" |
468 | 382 | 312 | ||
469 | 383 | #. module: l10n_es_payment_order | 313 | #. module: l10n_es_payment_order |
471 | 384 | #: code:addons/l10n_es_payment_order/wizard/export_remesas.py:166 | 314 | #: view:payment.mode:0 |
472 | 315 | msgid "CSB 19 Options" | ||
473 | 316 | msgstr "Opciones CSB 19" | ||
474 | 317 | |||
475 | 318 | #. module: l10n_es_payment_order | ||
476 | 319 | #: code:addons/l10n_es_payment_order/wizard/export_remesas.py:152 | ||
477 | 385 | #, python-format | 320 | #, python-format |
478 | 386 | msgid "remesa" | 321 | msgid "remesa" |
479 | 387 | msgstr "remesa" | 322 | msgstr "remesa" |
480 | 388 | 323 | ||
481 | 389 | #. module: l10n_es_payment_order | 324 | #. module: l10n_es_payment_order |
483 | 390 | #: code:addons/l10n_es_payment_order/wizard/export_remesas.py:83 | 325 | #: code:addons/l10n_es_payment_order/wizard/export_remesas.py:69 |
484 | 391 | #, python-format | 326 | #, python-format |
487 | 392 | msgid "" | 327 | msgid "User error:\n" |
486 | 393 | "User error:\n" | ||
488 | 394 | "\n" | 328 | "\n" |
489 | 395 | "Wizard can not generate export file, there are not payment lines." | 329 | "Wizard can not generate export file, there are not payment lines." |
492 | 396 | msgstr "" | 330 | msgstr "Error del usuario:\n" |
491 | 397 | "Error del usuario:\n" | ||
493 | 398 | "\n" | 331 | "\n" |
494 | 399 | "El asistente no puede generar el archivo de remesas, no existen recibos." | 332 | "El asistente no puede generar el archivo de remesas, no existen recibos." |
495 | 400 | 333 | ||
496 | 401 | #. module: l10n_es_payment_order | 334 | #. module: l10n_es_payment_order |
497 | 335 | #: view:payment.mode:0 | ||
498 | 336 | msgid "CSB 32 Options" | ||
499 | 337 | msgstr "Opciones CSB 32" | ||
500 | 338 | |||
501 | 339 | #. module: l10n_es_payment_order | ||
502 | 402 | #: code:addons/l10n_es_payment_order/wizard/converter.py:80 | 340 | #: code:addons/l10n_es_payment_order/wizard/converter.py:80 |
503 | 403 | #, python-format | 341 | #, python-format |
506 | 404 | msgid "" | 342 | msgid "Error:\n" |
505 | 405 | "Error:\n" | ||
507 | 406 | "\n" | 343 | "\n" |
508 | 407 | "Can not convert integer number %(number)d to fit in %(size)d characters." | 344 | "Can not convert integer number %(number)d to fit in %(size)d characters." |
511 | 408 | msgstr "" | 345 | msgstr "Error:\n" |
510 | 409 | "Error:\n" | ||
512 | 410 | "\n" | 346 | "\n" |
513 | 411 | "No se puede convertir el número entero %(number)d para que quepa en %(size)d caracteres." | 347 | "No se puede convertir el número entero %(number)d para que quepa en %(size)d caracteres." |
514 | 412 | 348 | ||
515 | 413 | #. module: l10n_es_payment_order | 349 | #. module: l10n_es_payment_order |
517 | 414 | #: wizard_field:export_payment_file_spain,export,note:0 | 350 | #: field:wizard.payment.file.spain,note:0 |
518 | 415 | msgid "Log" | 351 | msgid "Log" |
520 | 416 | msgstr "Registro" | 352 | msgstr "Log" |
521 | 417 | 353 | ||
522 | 418 | #. module: l10n_es_payment_order | 354 | #. module: l10n_es_payment_order |
526 | 419 | #: report:remesas.report:0 | 355 | #: code:addons/l10n_es_payment_order/wizard/export_remesas.py:140 |
527 | 420 | msgid "PAYMENT ORDER Num.:" | 356 | #, python-format |
528 | 421 | msgstr "REMESA Nº:" | 357 | msgid "User error:\n" |
529 | 358 | "\n" | ||
530 | 359 | "The payment mode is not CSB 19, CSB 32, CSB 34 or CSB 58" | ||
531 | 360 | msgstr "Error del usuario:\n" | ||
532 | 361 | "\n" | ||
533 | 362 | "El modo de pago no es CSB 19, CSB 32, CSB 34 ni CSB 58" | ||
534 | 422 | 363 | ||
535 | 423 | #. module: l10n_es_payment_order | 364 | #. module: l10n_es_payment_order |
536 | 424 | #: selection:payment.mode,tipo:0 | 365 | #: selection:payment.mode,tipo:0 |
537 | @@ -426,41 +367,33 @@ | |||
538 | 426 | msgstr "CSB 58" | 367 | msgstr "CSB 58" |
539 | 427 | 368 | ||
540 | 428 | #. module: l10n_es_payment_order | 369 | #. module: l10n_es_payment_order |
542 | 429 | #: code:addons/l10n_es_payment_order/remesas.py:107 | 370 | #: code:addons/l10n_es_payment_order/remesas.py:111 |
543 | 430 | #, python-format | 371 | #, python-format |
544 | 431 | msgid "Dear Sir" | 372 | msgid "Dear Sir" |
545 | 432 | msgstr "Estimado Sr." | 373 | msgstr "Estimado Sr." |
546 | 433 | 374 | ||
547 | 434 | #. module: l10n_es_payment_order | 375 | #. module: l10n_es_payment_order |
556 | 435 | #: report:remesas.report:0 | 376 | #: field:payment.mode,ine:0 |
557 | 436 | msgid "........." | 377 | msgid "INE code" |
558 | 437 | msgstr "........." | 378 | msgstr "Código INE" |
551 | 438 | |||
552 | 439 | #. module: l10n_es_payment_order | ||
553 | 440 | #: model:ir.module.module,shortdesc:l10n_es_payment_order.module_meta_information | ||
554 | 441 | msgid "Exportación de ficheros bancarios CSB 19, CSB 32, CSB 34 y CSB 58" | ||
555 | 442 | msgstr "Exportación de ficheros bancarios CSB 19, CSB 32, CSB 34 y CSB 58" | ||
559 | 443 | 379 | ||
560 | 444 | #. module: l10n_es_payment_order | 380 | #. module: l10n_es_payment_order |
561 | 445 | #: code:addons/l10n_es_payment_order/wizard/csb_34.py:128 | 381 | #: code:addons/l10n_es_payment_order/wizard/csb_34.py:128 |
562 | 446 | #, python-format | 382 | #, python-format |
565 | 447 | msgid "" | 383 | msgid "User error:\n" |
564 | 448 | "User error:\n" | ||
566 | 449 | "\n" | 384 | "\n" |
567 | 450 | "Company %s has no invoicing or default address." | 385 | "Company %s has no invoicing or default address." |
570 | 451 | msgstr "" | 386 | msgstr "Error del usuario:\n" |
569 | 452 | "Error del usuario:\n" | ||
571 | 453 | "\n" | 387 | "\n" |
572 | 454 | "La compañía %s no tiene dirección por defecto o de facturación." | 388 | "La compañía %s no tiene dirección por defecto o de facturación." |
573 | 455 | 389 | ||
574 | 456 | #. module: l10n_es_payment_order | 390 | #. module: l10n_es_payment_order |
579 | 457 | #: model:payment.type,name:l10n_es_payment_order.payment_type_cheque0 | 391 | #: selection:payment.mode,cost_key:0 |
580 | 458 | #: model:payment.type,note:l10n_es_payment_order.payment_type_cheque0 | 392 | msgid "Expense of the Payer" |
581 | 459 | msgid "Cheque" | 393 | msgstr "Gastos por cuenta del ordenante" |
578 | 460 | msgstr "Cheque" | ||
582 | 461 | 394 | ||
583 | 462 | #. module: l10n_es_payment_order | 395 | #. module: l10n_es_payment_order |
585 | 463 | #: code:addons/l10n_es_payment_order/wizard/export_remesas.py:168 | 396 | #: code:addons/l10n_es_payment_order/wizard/export_remesas.py:154 |
586 | 464 | #, python-format | 397 | #, python-format |
587 | 465 | msgid "Remesa " | 398 | msgid "Remesa " |
588 | 466 | msgstr "Remesa " | 399 | msgstr "Remesa " |
589 | @@ -471,11 +404,6 @@ | |||
590 | 471 | msgstr "Clave de gastos" | 404 | msgstr "Clave de gastos" |
591 | 472 | 405 | ||
592 | 473 | #. module: l10n_es_payment_order | 406 | #. module: l10n_es_payment_order |
593 | 474 | #: model:ir.model,name:l10n_es_payment_order.model_payment_order | ||
594 | 475 | msgid "Payment Order" | ||
595 | 476 | msgstr "Orden de pago" | ||
596 | 477 | |||
597 | 478 | #. module: l10n_es_payment_order | ||
598 | 479 | #: field:payment.mode,concept:0 | 407 | #: field:payment.mode,concept:0 |
599 | 480 | msgid "Concept of the Order" | 408 | msgid "Concept of the Order" |
600 | 481 | msgstr "Concepto de la orden." | 409 | msgstr "Concepto de la orden." |
601 | @@ -487,6 +415,12 @@ | |||
602 | 487 | msgstr "Transferencia" | 415 | msgstr "Transferencia" |
603 | 488 | 416 | ||
604 | 489 | #. module: l10n_es_payment_order | 417 | #. module: l10n_es_payment_order |
605 | 418 | #: model:payment.type,name:l10n_es_payment_order.payment_type_cheque0 | ||
606 | 419 | #: model:payment.type,note:l10n_es_payment_order.payment_type_cheque0 | ||
607 | 420 | msgid "Cheque" | ||
608 | 421 | msgstr "Cheque" | ||
609 | 422 | |||
610 | 423 | #. module: l10n_es_payment_order | ||
611 | 490 | #: model:payment.type,note:l10n_es_payment_order.payment_type_pagare0 | 424 | #: model:payment.type,note:l10n_es_payment_order.payment_type_pagare0 |
612 | 491 | msgid "Pagare" | 425 | msgid "Pagare" |
613 | 492 | msgstr "Pagaré" | 426 | msgstr "Pagaré" |
614 | @@ -497,25 +431,14 @@ | |||
615 | 497 | msgstr "Opciones CSB 34" | 431 | msgstr "Opciones CSB 34" |
616 | 498 | 432 | ||
617 | 499 | #. module: l10n_es_payment_order | 433 | #. module: l10n_es_payment_order |
620 | 500 | #: wizard_view:export_payment_file_spain,export:0 | 434 | #: view:wizard.payment.file.spain:0 |
619 | 501 | #: wizard_view:export_payment_file_spain,init:0 | ||
621 | 502 | msgid "Payment order export" | 435 | msgid "Payment order export" |
636 | 503 | msgstr "Exportar orden de pago" | 436 | msgstr "Exportar fichero de pagos" |
637 | 504 | 437 | ||
638 | 505 | #. module: l10n_es_payment_order | 438 | #. module: l10n_es_payment_order |
639 | 506 | #: report:remesas.report:0 | 439 | #: field:wizard.payment.file.spain,join:0 |
626 | 507 | msgid "Total payment order:" | ||
627 | 508 | msgstr "Total Remesa:" | ||
628 | 509 | |||
629 | 510 | #. module: l10n_es_payment_order | ||
630 | 511 | #: field:payment.mode,payroll_check:0 | ||
631 | 512 | msgid "Payroll Check" | ||
632 | 513 | msgstr "Cheque nómina" | ||
633 | 514 | |||
634 | 515 | #. module: l10n_es_payment_order | ||
635 | 516 | #: wizard_field:export_payment_file_spain,init,join:0 | ||
640 | 517 | msgid "Join payment lines of the same partner and bank account" | 440 | msgid "Join payment lines of the same partner and bank account" |
642 | 518 | msgstr "Fusionar recibos de la misma empresa y cuenta bancaria" | 441 | msgstr "Unir las líneas de pagos del mismo cliente y cuenta bancaria" |
643 | 519 | 442 | ||
644 | 520 | #. module: l10n_es_payment_order | 443 | #. module: l10n_es_payment_order |
645 | 521 | #: field:payment.mode,alt_domicile_format:0 | 444 | #: field:payment.mode,alt_domicile_format:0 |
646 | @@ -533,14 +456,12 @@ | |||
647 | 533 | msgstr "Orden de abono directo" | 456 | msgstr "Orden de abono directo" |
648 | 534 | 457 | ||
649 | 535 | #. module: l10n_es_payment_order | 458 | #. module: l10n_es_payment_order |
651 | 536 | #: code:addons/l10n_es_payment_order/wizard/export_remesas.py:94 | 459 | #: code:addons/l10n_es_payment_order/wizard/export_remesas.py:80 |
652 | 537 | #, python-format | 460 | #, python-format |
655 | 538 | msgid "" | 461 | msgid "User error:\n" |
654 | 539 | "User error:\n" | ||
656 | 540 | "\n" | 462 | "\n" |
657 | 541 | "The company VAT number related to the bank account of the payment mode is not defined." | 463 | "The company VAT number related to the bank account of the payment mode is not defined." |
660 | 542 | msgstr "" | 464 | msgstr "Error del usuario:\n" |
659 | 543 | "Error del usuario:\n" | ||
661 | 544 | "\n" | 465 | "\n" |
662 | 545 | "No se ha definido el CIF de la compañía asociada al C.C. del modo de pago." | 466 | "No se ha definido el CIF de la compañía asociada al C.C. del modo de pago." |
663 | 546 | 467 | ||
664 | @@ -550,9 +471,9 @@ | |||
665 | 550 | msgstr "Datos adicionales para pagarés, cheques y pagos certificados." | 471 | msgstr "Datos adicionales para pagarés, cheques y pagos certificados." |
666 | 551 | 472 | ||
667 | 552 | #. module: l10n_es_payment_order | 473 | #. module: l10n_es_payment_order |
671 | 553 | #: report:remesas.report:0 | 474 | #: view:wizard.payment.file.spain:0 |
672 | 554 | msgid "Invoice" | 475 | msgid "Cancel" |
673 | 555 | msgstr "Factura" | 476 | msgstr "Cancel" |
674 | 556 | 477 | ||
675 | 557 | #. module: l10n_es_payment_order | 478 | #. module: l10n_es_payment_order |
676 | 558 | #: field:payment.mode,text1:0 | 479 | #: field:payment.mode,text1:0 |
677 | @@ -565,41 +486,35 @@ | |||
678 | 565 | msgstr "Línea 2" | 486 | msgstr "Línea 2" |
679 | 566 | 487 | ||
680 | 567 | #. module: l10n_es_payment_order | 488 | #. module: l10n_es_payment_order |
692 | 568 | #: field:payment.mode,not_to_the_order:0 | 489 | #: selection:payment.mode,cost_key:0 |
693 | 569 | msgid "Not to the Order" | 490 | msgid "Expense of the Recipient" |
694 | 570 | msgstr "No a la orden" | 491 | msgstr "Gastos por cuenta del beneficiario" |
695 | 571 | 492 | ||
696 | 572 | #. module: l10n_es_payment_order | 493 | #. module: l10n_es_payment_order |
697 | 573 | #: view:payment.mode:0 | 494 | #: model:payment.type,name:l10n_es_payment_order.payment_type_reposicion0 |
698 | 574 | msgid "CSB 32 Options" | 495 | #: model:payment.type,note:l10n_es_payment_order.payment_type_reposicion0 |
699 | 575 | msgstr "Opciones CSB 32" | 496 | msgid "Reposición" |
700 | 576 | 497 | msgstr "Reposición" | |
701 | 577 | #. module: l10n_es_payment_order | 498 | |
702 | 578 | #: wizard_field:export_payment_file_spain,export,pay:0 | 499 | #. module: l10n_es_payment_order |
703 | 500 | #: field:wizard.payment.file.spain,pay:0 | ||
704 | 579 | msgid "Payment order file" | 501 | msgid "Payment order file" |
716 | 580 | msgstr "Archivo remesa" | 502 | msgstr "Fichero de pagos" |
717 | 581 | 503 | ||
718 | 582 | #. module: l10n_es_payment_order | 504 | #. module: l10n_es_payment_order |
719 | 583 | #: report:remesas.report:0 | 505 | #: selection:payment.mode,csb34_type:0 |
720 | 584 | msgid "Created date:" | 506 | msgid "Transfer" |
721 | 585 | msgstr "Fecha confección:" | 507 | msgstr "Transferencia" |
711 | 586 | |||
712 | 587 | #. module: l10n_es_payment_order | ||
713 | 588 | #: selection:payment.mode,cost_key:0 | ||
714 | 589 | msgid "Expense of the Payer" | ||
715 | 590 | msgstr "Gastos por cuenta del ordenante" | ||
722 | 591 | 508 | ||
723 | 592 | #. module: l10n_es_payment_order | 509 | #. module: l10n_es_payment_order |
724 | 593 | #: code:addons/l10n_es_payment_order/wizard/csb_34.py:143 | 510 | #: code:addons/l10n_es_payment_order/wizard/csb_34.py:143 |
726 | 594 | #: code:addons/l10n_es_payment_order/wizard/csb_34.py:340 | 511 | #: code:addons/l10n_es_payment_order/wizard/csb_34.py:341 |
727 | 595 | #, python-format | 512 | #, python-format |
730 | 596 | msgid "" | 513 | msgid "Configuration error:\n" |
729 | 597 | "Configuration error:\n" | ||
731 | 598 | "\n" | 514 | "\n" |
732 | 599 | "A line in \"%s\" is not 72 characters long:\n" | 515 | "A line in \"%s\" is not 72 characters long:\n" |
733 | 600 | "%s" | 516 | "%s" |
736 | 601 | msgstr "" | 517 | msgstr "Error de configuración:\n" |
735 | 602 | "Error de configuración:\n" | ||
737 | 603 | "\n" | 518 | "\n" |
738 | 604 | "Una línea del \"%s\" no tiene 72 caracteres:\n" | 519 | "Una línea del \"%s\" no tiene 72 caracteres:\n" |
739 | 605 | "%s" | 520 | "%s" |
740 | @@ -610,37 +525,6 @@ | |||
741 | 610 | msgstr "Opciones CSB 58" | 525 | msgstr "Opciones CSB 58" |
742 | 611 | 526 | ||
743 | 612 | #. module: l10n_es_payment_order | 527 | #. module: l10n_es_payment_order |
744 | 613 | #: code:addons/l10n_es_payment_order/wizard/csb_19.py:54 | ||
745 | 614 | #: code:addons/l10n_es_payment_order/wizard/csb_19.py:86 | ||
746 | 615 | #: code:addons/l10n_es_payment_order/wizard/csb_19.py:110 | ||
747 | 616 | #: code:addons/l10n_es_payment_order/wizard/csb_19.py:123 | ||
748 | 617 | #: code:addons/l10n_es_payment_order/wizard/csb_19.py:138 | ||
749 | 618 | #: code:addons/l10n_es_payment_order/wizard/csb_19.py:165 | ||
750 | 619 | #: code:addons/l10n_es_payment_order/wizard/csb_58.py:53 | ||
751 | 620 | #: code:addons/l10n_es_payment_order/wizard/csb_58.py:71 | ||
752 | 621 | #: code:addons/l10n_es_payment_order/wizard/csb_58.py:100 | ||
753 | 622 | #: code:addons/l10n_es_payment_order/wizard/csb_58.py:111 | ||
754 | 623 | #: code:addons/l10n_es_payment_order/wizard/csb_58.py:231 | ||
755 | 624 | #: code:addons/l10n_es_payment_order/wizard/csb_58.py:247 | ||
756 | 625 | #: code:addons/l10n_es_payment_order/wizard/csb_58.py:264 | ||
757 | 626 | #, python-format | ||
758 | 627 | msgid "" | ||
759 | 628 | "Configuration error:\n" | ||
760 | 629 | "\n" | ||
761 | 630 | "The line \"%s\" is not 162 characters long:\n" | ||
762 | 631 | "%s" | ||
763 | 632 | msgstr "" | ||
764 | 633 | "Error de configuración:\n" | ||
765 | 634 | "\n" | ||
766 | 635 | "La línea \"%s\" no tiene 162 caracteres:\n" | ||
767 | 636 | "%s" | ||
768 | 637 | |||
769 | 638 | #. module: l10n_es_payment_order | ||
770 | 639 | #: report:remesas.report:0 | ||
771 | 640 | msgid "Bank:" | ||
772 | 641 | msgstr "Banco:" | ||
773 | 642 | |||
774 | 643 | #. module: l10n_es_payment_order | ||
775 | 644 | #: selection:payment.mode,csb34_type:0 | 528 | #: selection:payment.mode,csb34_type:0 |
776 | 645 | msgid "Promissory Note" | 529 | msgid "Promissory Note" |
777 | 646 | msgstr "Pagaré" | 530 | msgstr "Pagaré" |
778 | @@ -657,12 +541,12 @@ | |||
779 | 657 | msgstr "Actívelo si desea añadir el tipo de dato 910 con la fecha de pago en el archivo." | 541 | msgstr "Actívelo si desea añadir el tipo de dato 910 con la fecha de pago en el archivo." |
780 | 658 | 542 | ||
781 | 659 | #. module: l10n_es_payment_order | 543 | #. module: l10n_es_payment_order |
785 | 660 | #: selection:payment.mode,csb34_type:0 | 544 | #: field:payment.mode,payroll_check:0 |
786 | 661 | msgid "Certified Payments" | 545 | msgid "Payroll Check" |
787 | 662 | msgstr "Pagos certificados" | 546 | msgstr "Cheque nómina" |
788 | 663 | 547 | ||
789 | 664 | #. module: l10n_es_payment_order | 548 | #. module: l10n_es_payment_order |
791 | 665 | #: code:addons/l10n_es_payment_order/remesas.py:109 | 549 | #: code:addons/l10n_es_payment_order/remesas.py:113 |
792 | 666 | #, python-format | 550 | #, python-format |
793 | 667 | msgid "Total:" | 551 | msgid "Total:" |
794 | 668 | msgstr "Total:" | 552 | msgstr "Total:" |
795 | @@ -683,14 +567,12 @@ | |||
796 | 683 | msgstr "Nómina" | 567 | msgstr "Nómina" |
797 | 684 | 568 | ||
798 | 685 | #. module: l10n_es_payment_order | 569 | #. module: l10n_es_payment_order |
800 | 686 | #: code:addons/l10n_es_payment_order/wizard/export_remesas.py:90 | 570 | #: code:addons/l10n_es_payment_order/wizard/export_remesas.py:76 |
801 | 687 | #, python-format | 571 | #, python-format |
804 | 688 | msgid "" | 572 | msgid "User error:\n" |
803 | 689 | "User error:\n" | ||
805 | 690 | "\n" | 573 | "\n" |
806 | 691 | "The bank account number of the company %s has not 20 digits." | 574 | "The bank account number of the company %s has not 20 digits." |
809 | 692 | msgstr "" | 575 | msgstr "Error del usuario:\n" |
808 | 693 | "Error del usuario:\n" | ||
810 | 694 | "\n" | 576 | "\n" |
811 | 695 | "El número de C.C. de la compañía %s no tiene 20 dígitos." | 577 | "El número de C.C. de la compañía %s no tiene 20 dígitos." |
812 | 696 | 578 | ||
813 | @@ -702,23 +584,26 @@ | |||
814 | 702 | #. module: l10n_es_payment_order | 584 | #. module: l10n_es_payment_order |
815 | 703 | #: code:addons/l10n_es_payment_order/wizard/csb_34.py:166 | 585 | #: code:addons/l10n_es_payment_order/wizard/csb_34.py:166 |
816 | 704 | #, python-format | 586 | #, python-format |
819 | 705 | msgid "" | 587 | msgid "User error:\n" |
818 | 706 | "User error:\n" | ||
820 | 707 | "\n" | 588 | "\n" |
821 | 708 | "Partner %s has no invoicing or default address." | 589 | "Partner %s has no invoicing or default address." |
824 | 709 | msgstr "" | 590 | msgstr "Error del usuario:\n" |
823 | 710 | "Error del usuario:\n" | ||
825 | 711 | "\n" | 591 | "\n" |
826 | 712 | "La compañía %s no tiene dirección por defecto o de facturación." | 592 | "La compañía %s no tiene dirección por defecto o de facturación." |
827 | 713 | 593 | ||
828 | 714 | #. module: l10n_es_payment_order | 594 | #. module: l10n_es_payment_order |
830 | 715 | #: code:addons/l10n_es_payment_order/remesas.py:108 | 595 | #: code:addons/l10n_es_payment_order/remesas.py:112 |
831 | 716 | #, python-format | 596 | #, python-format |
832 | 717 | msgid "Payment ref." | 597 | msgid "Payment ref." |
833 | 718 | msgstr "Ref. de pago" | 598 | msgstr "Ref. de pago" |
834 | 719 | 599 | ||
835 | 720 | #. module: l10n_es_payment_order | 600 | #. module: l10n_es_payment_order |
836 | 721 | #: selection:payment.mode,send_type:0 | 601 | #: selection:payment.mode,send_type:0 |
837 | 602 | msgid "Certified Mail" | ||
838 | 603 | msgstr "Correo certificado" | ||
839 | 604 | |||
840 | 605 | #. module: l10n_es_payment_order | ||
841 | 606 | #: selection:payment.mode,send_type:0 | ||
842 | 722 | msgid "Ordinary Mail" | 607 | msgid "Ordinary Mail" |
843 | 723 | msgstr "Correo ordinario" | 608 | msgstr "Correo ordinario" |
844 | 724 | 609 | ||
845 | @@ -730,50 +615,43 @@ | |||
846 | 730 | msgstr "Introduzca un texto y/o seleccione un campo de la factura para incluirlo como descripción en la carta. Los posibles valores son: ${amount}, ${communication}, {communication2}, {date}, {ml_maturity_date}, {create_date}, {ml_date_created}" | 615 | msgstr "Introduzca un texto y/o seleccione un campo de la factura para incluirlo como descripción en la carta. Los posibles valores son: ${amount}, ${communication}, {communication2}, {date}, {ml_maturity_date}, {create_date}, {ml_date_created}" |
847 | 731 | 616 | ||
848 | 732 | #. module: l10n_es_payment_order | 617 | #. module: l10n_es_payment_order |
896 | 733 | #: model:ir.actions.wizard,name:l10n_es_payment_order.wizard_create_payment_file_spain | 618 | #: code:addons/l10n_es_payment_order/wizard/csb_19.py:57 |
897 | 734 | msgid "Create payment file" | 619 | #: code:addons/l10n_es_payment_order/wizard/csb_19.py:89 |
898 | 735 | msgstr "Crear fichero de pagos" | 620 | #: code:addons/l10n_es_payment_order/wizard/csb_19.py:113 |
899 | 736 | 621 | #: code:addons/l10n_es_payment_order/wizard/csb_19.py:126 | |
900 | 737 | #. module: l10n_es_payment_order | 622 | #: code:addons/l10n_es_payment_order/wizard/csb_19.py:156 |
901 | 738 | #: report:remesas.report:0 | 623 | #: code:addons/l10n_es_payment_order/wizard/csb_19.py:162 |
902 | 739 | msgid "Amount" | 624 | #: code:addons/l10n_es_payment_order/wizard/csb_19.py:178 |
903 | 740 | msgstr "Importe" | 625 | #: code:addons/l10n_es_payment_order/wizard/csb_19.py:205 |
904 | 741 | 626 | #: code:addons/l10n_es_payment_order/wizard/csb_58.py:53 | |
905 | 742 | #. module: l10n_es_payment_order | 627 | #: code:addons/l10n_es_payment_order/wizard/csb_58.py:71 |
906 | 743 | #: report:remesas.report:0 | 628 | #: code:addons/l10n_es_payment_order/wizard/csb_58.py:100 |
907 | 744 | msgid "Company:" | 629 | #: code:addons/l10n_es_payment_order/wizard/csb_58.py:111 |
908 | 745 | msgstr "Compañía:" | 630 | #: code:addons/l10n_es_payment_order/wizard/csb_58.py:231 |
909 | 746 | 631 | #: code:addons/l10n_es_payment_order/wizard/csb_58.py:247 | |
910 | 747 | #. module: l10n_es_payment_order | 632 | #: code:addons/l10n_es_payment_order/wizard/csb_58.py:264 |
911 | 748 | #: selection:payment.mode,send_type:0 | 633 | #, python-format |
912 | 749 | msgid "Certified Mail" | 634 | msgid "Configuration error:\n" |
913 | 750 | msgstr "Correo certificado" | 635 | "\n" |
914 | 751 | 636 | "The line \"%s\" is not 162 characters long:\n" | |
915 | 752 | #. module: l10n_es_payment_order | 637 | "%s" |
916 | 753 | #: report:remesas.report:0 | 638 | msgstr "Error de configuración:\n" |
917 | 754 | msgid "Type:" | 639 | "\n" |
918 | 755 | msgstr "Tipo:" | 640 | "La línea \"%s\" no tiene 162 caracteres:\n" |
919 | 756 | 641 | "%s" | |
920 | 757 | #. module: l10n_es_payment_order | 642 | |
921 | 758 | #: view:payment.mode:0 | 643 | #. module: l10n_es_payment_order |
922 | 759 | msgid "CSB 19 Options" | 644 | #: model:ir.actions.act_window,name:l10n_es_payment_order.action_wizard_payment_file_spain |
923 | 760 | msgstr "Opciones CSB 19" | 645 | msgid "Create payments file" |
924 | 761 | 646 | msgstr "Crear fichero de cobros/pagos" | |
925 | 762 | #. module: l10n_es_payment_order | 647 | |
926 | 763 | #: field:payment.mode,csb19_extra_concepts:0 | 648 | #. module: l10n_es_payment_order |
927 | 764 | msgid "Extra Concepts" | 649 | #: model:payment.type,name:l10n_es_payment_order.payment_type_convenido0 |
928 | 765 | msgstr "Conceptos Extra" | 650 | #: model:payment.type,note:l10n_es_payment_order.payment_type_convenido0 |
929 | 766 | 651 | msgid "Convenido" | |
930 | 767 | #~ msgid "" | 652 | msgstr "Convenido" |
931 | 768 | #~ "Check it if you want to add the 015 data type and the text of the letter " | 653 | |
932 | 769 | #~ "in the file." | 654 | #. module: l10n_es_payment_order |
933 | 770 | #~ msgstr "" | 655 | #: help:payment.mode,csb19_extra_concepts:0 |
934 | 771 | #~ "Actívelo si desea añadir el tipo de dato 015 y el texto de la carta en el " | 656 | msgid "Check it if you want to add the invoice lines to the extra concepts (Max. 15 lines)" |
935 | 772 | #~ "archivo." | 657 | msgstr "Chequear si se quiere añadir a las líneas de factura conceptos extra (Máx. 15 líneas)" |
889 | 773 | #~ msgid "Date Check" | ||
890 | 774 | #~ msgstr "Añadir fecha" | ||
891 | 775 | #~ msgid "Invalid XML for View Architecture!" | ||
892 | 776 | #~ msgstr "¡XML inválido para la definición de la vista!" | ||
893 | 777 | #~ msgid "Optional Text for the Letter" | ||
894 | 778 | #~ msgstr "Texto opcional para añadir a la carta." | ||
895 | 779 | |||
936 | 780 | 658 | ||
937 | === modified file 'l10n_es_payment_order/remesas_data.xml' | |||
938 | --- l10n_es_payment_order/remesas_data.xml 2011-10-26 18:26:56 +0000 | |||
939 | +++ l10n_es_payment_order/remesas_data.xml 2013-01-11 10:23:22 +0000 | |||
940 | @@ -10,28 +10,28 @@ | |||
941 | 10 | </record> | 10 | </record> |
942 | 11 | <record id="payment_type_transferencia0" model="payment.type"> | 11 | <record id="payment_type_transferencia0" model="payment.type"> |
943 | 12 | <field name="code">TRANSFERENCIA_CSB</field> | 12 | <field name="code">TRANSFERENCIA_CSB</field> |
945 | 13 | <field name="name">Transferencia</field> | 13 | <field name="name">Transferencia CSB</field> |
946 | 14 | <field eval="[(6,0,[ref('base.bank_normal')])]" name="suitable_bank_types"/> | 14 | <field eval="[(6,0,[ref('base.bank_normal')])]" name="suitable_bank_types"/> |
947 | 15 | <field name="note">Transferencia</field> | 15 | <field name="note">Transferencia</field> |
948 | 16 | <field eval="1" name="active"/> | 16 | <field eval="1" name="active"/> |
949 | 17 | </record> | 17 | </record> |
950 | 18 | <record id="payment_type_cheque0" model="payment.type"> | 18 | <record id="payment_type_cheque0" model="payment.type"> |
951 | 19 | <field name="code">CHEQUE_CSB</field> | 19 | <field name="code">CHEQUE_CSB</field> |
953 | 20 | <field name="name">Cheque</field> | 20 | <field name="name">Cheque CSB</field> |
954 | 21 | <field eval="[(6,0,[ref('base.bank_normal')])]" name="suitable_bank_types"/> | 21 | <field eval="[(6,0,[ref('base.bank_normal')])]" name="suitable_bank_types"/> |
955 | 22 | <field name="note">Cheque</field> | 22 | <field name="note">Cheque</field> |
956 | 23 | <field eval="1" name="active"/> | 23 | <field eval="1" name="active"/> |
957 | 24 | </record> | 24 | </record> |
958 | 25 | <record id="payment_type_pagare0" model="payment.type"> | 25 | <record id="payment_type_pagare0" model="payment.type"> |
959 | 26 | <field name="code">PAGARE_CSB</field> | 26 | <field name="code">PAGARE_CSB</field> |
961 | 27 | <field name="name">Pagaré</field> | 27 | <field name="name">Pagaré CSB</field> |
962 | 28 | <field eval="[(6,0,[ref('base.bank_normal')])]" name="suitable_bank_types"/> | 28 | <field eval="[(6,0,[ref('base.bank_normal')])]" name="suitable_bank_types"/> |
963 | 29 | <field name="note">Pagare</field> | 29 | <field name="note">Pagare</field> |
964 | 30 | <field eval="1" name="active"/> | 30 | <field eval="1" name="active"/> |
965 | 31 | </record> | 31 | </record> |
966 | 32 | <record id="payment_type_pago_certificado0" model="payment.type"> | 32 | <record id="payment_type_pago_certificado0" model="payment.type"> |
967 | 33 | <field name="code">PAGO_CERTIFICADO_CSB</field> | 33 | <field name="code">PAGO_CERTIFICADO_CSB</field> |
969 | 34 | <field name="name">Pago certificado</field> | 34 | <field name="name">Pago certificado CSB</field> |
970 | 35 | <field eval="[(6,0,[ref('base.bank_normal')])]" name="suitable_bank_types"/> | 35 | <field eval="[(6,0,[ref('base.bank_normal')])]" name="suitable_bank_types"/> |
971 | 36 | <field name="note">Pago certificado</field> | 36 | <field name="note">Pago certificado</field> |
972 | 37 | <field eval="1" name="active"/> | 37 | <field eval="1" name="active"/> |
973 | 38 | 38 | ||
974 | === modified file 'l10n_es_payment_order/remesas_view.xml' | |||
975 | --- l10n_es_payment_order/remesas_view.xml 2011-08-03 15:44:39 +0000 | |||
976 | +++ l10n_es_payment_order/remesas_view.xml 2013-01-11 10:23:22 +0000 | |||
977 | @@ -74,8 +74,8 @@ | |||
978 | 74 | </group> | 74 | </group> |
979 | 75 | </group> | 75 | </group> |
980 | 76 | <newline/> | 76 | <newline/> |
981 | 77 | </field> | ||
982 | 77 | </field> | 78 | </field> |
983 | 78 | </field> | ||
984 | 79 | </record> | 79 | </record> |
985 | 80 | 80 | ||
986 | 81 | </data> | 81 | </data> |
987 | 82 | 82 | ||
988 | === added directory 'l10n_es_payment_order/security' | |||
989 | === added file 'l10n_es_payment_order/security/ir.model.access.csv' | |||
990 | --- l10n_es_payment_order/security/ir.model.access.csv 1970-01-01 00:00:00 +0000 | |||
991 | +++ l10n_es_payment_order/security/ir.model.access.csv 2013-01-11 10:23:22 +0000 | |||
992 | @@ -0,0 +1,13 @@ | |||
993 | 1 | id,name,model_id:id,group_id:id,perm_read,perm_write,perm_create,perm_unlink | ||
994 | 2 | access_csb_19,csb.19,model_csb_19,account_payment.group_account_payment,1,1,1,1 | ||
995 | 3 | access_csb_19_user,csb.19.user,model_csb_19,base.group_user,1,0,0,0 | ||
996 | 4 | access_csb_32,csb.32,model_csb_32,account_payment.group_account_payment,1,1,1,1 | ||
997 | 5 | access_csb_32_user,csb.32.user,model_csb_32,base.group_user,1,0,0,0 | ||
998 | 6 | access_csb_34,csb.34,model_csb_34,account_payment.group_account_payment,1,1,1,1 | ||
999 | 7 | access_csb_34_user,csb.34.user,model_csb_34,base.group_user,1,0,0,0 | ||
1000 | 8 | access_csb_3401,csb.3401,model_csb_3401,account_payment.group_account_payment,1,1,1,1 | ||
1001 | 9 | access_csb_3401_user,csb.3401.user,model_csb_3401,base.group_user,1,0,0,0 | ||
1002 | 10 | access_csb_58,csb.58,model_csb_58,account_payment.group_account_payment,1,1,1,1 | ||
1003 | 11 | access_csb_58_user,csb.58.user,model_csb_58,base.group_user,1,0,0,0 | ||
1004 | 12 | access_payment_converter_spain,payment.converter.spain,model_payment_converter_spain,account_payment.group_account_payment,1,1,1,1 | ||
1005 | 13 | access_payment_converter_spain_user,payment.converter.spain,model_payment_converter_spain,base.group_user,1,0,0,0 | ||
1006 | 0 | 14 | ||
1007 | === modified file 'l10n_es_payment_order/wizard/__init__.py' | |||
1008 | --- l10n_es_payment_order/wizard/__init__.py 2011-08-29 15:11:11 +0000 | |||
1009 | +++ l10n_es_payment_order/wizard/__init__.py 2013-01-11 10:23:22 +0000 | |||
1010 | @@ -7,7 +7,11 @@ | |||
1011 | 7 | # Copyright (c) 2008 Pablo Rocandio. All Rights Reserved. | 7 | # Copyright (c) 2008 Pablo Rocandio. All Rights Reserved. |
1012 | 8 | # Copyright (c) 2009 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved. | 8 | # Copyright (c) 2009 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved. |
1013 | 9 | # Jordi Esteve <jesteve@zikzakmedia.com> | 9 | # Jordi Esteve <jesteve@zikzakmedia.com> |
1014 | 10 | # AvanzOSC, Advanced Open Source Consulting | ||
1015 | 11 | # Copyright (C) 2011-2012 Ainara Galdona (www.avanzosc.com). All Rights Reserved | ||
1016 | 10 | # $Id$ | 12 | # $Id$ |
1017 | 13 | # Refactorización. Acysos S.L. (http://www.acysos.com) 2012 | ||
1018 | 14 | # Ignacio Ibeas <ignacio@acysos.com> | ||
1019 | 11 | # | 15 | # |
1020 | 12 | # This program is free software: you can redistribute it and/or modify | 16 | # This program is free software: you can redistribute it and/or modify |
1021 | 13 | # it under the terms of the GNU Affero General Public License as published by | 17 | # it under the terms of the GNU Affero General Public License as published by |
1022 | @@ -25,3 +29,9 @@ | |||
1023 | 25 | ############################################################################## | 29 | ############################################################################## |
1024 | 26 | 30 | ||
1025 | 27 | import export_remesas | 31 | import export_remesas |
1026 | 32 | import converter | ||
1027 | 33 | import csb_19 | ||
1028 | 34 | import csb_32 | ||
1029 | 35 | import csb_34 | ||
1030 | 36 | import csb_34_01 | ||
1031 | 37 | import csb_58 | ||
1032 | 28 | 38 | ||
1033 | === modified file 'l10n_es_payment_order/wizard/converter.py' | |||
1034 | --- l10n_es_payment_order/wizard/converter.py 2012-05-22 15:31:15 +0000 | |||
1035 | +++ l10n_es_payment_order/wizard/converter.py 2013-01-11 10:23:22 +0000 | |||
1036 | @@ -10,6 +10,8 @@ | |||
1037 | 10 | # Copyright (c) 2009 NaN (http://www.nan-tic.com) All Rights Reserved. | 10 | # Copyright (c) 2009 NaN (http://www.nan-tic.com) All Rights Reserved. |
1038 | 11 | # Albert Cervera i Areny <albert@nan-tic.com> | 11 | # Albert Cervera i Areny <albert@nan-tic.com> |
1039 | 12 | # $Id$ | 12 | # $Id$ |
1040 | 13 | # Refactorización. Acysos S.L. (http://www.acysos.com) 2012 | ||
1041 | 14 | # Ignacio Ibeas <ignacio@acysos.com> | ||
1042 | 13 | # | 15 | # |
1043 | 14 | # This program is free software: you can redistribute it and/or modify | 16 | # This program is free software: you can redistribute it and/or modify |
1044 | 15 | # it under the terms of the GNU Affero General Public License as published by | 17 | # it under the terms of the GNU Affero General Public License as published by |
1045 | @@ -26,95 +28,86 @@ | |||
1046 | 26 | # | 28 | # |
1047 | 27 | ############################################################################## | 29 | ############################################################################## |
1048 | 28 | 30 | ||
1049 | 31 | from osv import osv, fields | ||
1050 | 29 | from tools.translate import _ | 32 | from tools.translate import _ |
1141 | 30 | 33 | from log import * | |
1142 | 31 | def digits_only(cc_in): | 34 | |
1143 | 32 | """Discards non-numeric chars""" | 35 | class payment_converter_spain(osv.osv): |
1144 | 33 | 36 | _name= 'payment.converter.spain' | |
1145 | 34 | cc = "" | 37 | _auto = False |
1146 | 35 | for i in cc_in or '': | 38 | |
1147 | 36 | try: | 39 | def digits_only(self, cr, uid, cc_in): |
1148 | 37 | int(i) | 40 | """Discards non-numeric chars""" |
1149 | 38 | cc += i | 41 | |
1150 | 39 | except ValueError: | 42 | cc = "" |
1151 | 40 | pass | 43 | for i in cc_in or '': |
1152 | 41 | return cc | 44 | try: |
1153 | 42 | 45 | int(i) | |
1154 | 43 | def to_ascii(text): | 46 | cc += i |
1155 | 44 | """Converts special characters such as those with accents to their ASCII equivalents""" | 47 | except ValueError: |
1156 | 45 | old_chars = ['á','é','í','ó','ú','à','è','ì','ò','ù','ä','ë','ï','ö','ü','â','ê','î','ô','û','Á','É','Í','Ú','Ó','À','È','Ì','Ò','Ù','Ä','Ë','Ï','Ö','Ü','Â','Ê','Î','Ô','Û','ñ','Ñ','ç','Ç','ª','º','·','\n'] | 48 | pass |
1157 | 46 | new_chars = ['a','e','i','o','u','a','e','i','o','u','a','e','i','o','u','a','e','i','o','u','A','E','I','O','U','A','E','I','O','U','A','E','I','O','U','A','E','I','O','U','n','N','c','C','a','o','.',' '] | 49 | return cc |
1158 | 47 | for old, new in zip(old_chars, new_chars): | 50 | |
1159 | 48 | text = text.replace(unicode(old,'UTF-8'), new) | 51 | def to_ascii(self, cr, uid, text): |
1160 | 49 | return text | 52 | """Converts special characters such as those with accents to their ASCII equivalents""" |
1161 | 50 | 53 | old_chars = ['á','é','í','ó','ú','à','è','ì','ò','ù','ä','ë','ï','ö','ü','â','ê','î','ô','û','Á','É','Í','Ú','Ó','À','È','Ì','Ò','Ù','Ä','Ë','Ï','Ö','Ü','Â','Ê','Î','Ô','Û','ñ','Ñ','ç','Ç','ª','º','·','\n'] | |
1162 | 51 | 54 | new_chars = ['a','e','i','o','u','a','e','i','o','u','a','e','i','o','u','a','e','i','o','u','A','E','I','O','U','A','E','I','O','U','A','E','I','O','U','A','E','I','O','U','n','N','c','C','a','o','.',' '] | |
1163 | 52 | class Log(Exception): | 55 | for old, new in zip(old_chars, new_chars): |
1164 | 53 | def __init__(self, content = '', error = False): | 56 | text = text.replace(unicode(old,'UTF-8'), new) |
1165 | 54 | self.content = content | 57 | return text |
1166 | 55 | self.error = error | 58 | |
1167 | 56 | def add(self, s, error=True): | 59 | def convert_text(self, cr, uid, text, size, justified='left'): |
1168 | 57 | self.content = self.content + s | 60 | if justified == 'left': |
1169 | 58 | if error: | 61 | return self.to_ascii(cr,uid,text)[:size].ljust(size) |
1170 | 59 | self.error = error | 62 | else: |
1171 | 60 | def __call__(self): | 63 | return self.to_ascii(cr,uid,text)[:size].rjust(size) |
1172 | 61 | return self.content | 64 | |
1173 | 62 | def __str__(self): | 65 | def convert_float(self, cr, uid, number, size, context): |
1174 | 63 | return self.content | 66 | text = str( int( round( number * 100, 0 ) ) ) |
1175 | 64 | 67 | if len(text) > size: | |
1176 | 65 | def convert_text(text, size, justified='left'): | 68 | raise Log(_('Error:\n\nCan not convert float number %(number).2f to fit in %(size)d characters.') % { |
1177 | 66 | if justified == 'left': | 69 | 'number': number, |
1178 | 67 | return to_ascii(text)[:size].ljust(size) | 70 | 'size': size |
1179 | 68 | else: | 71 | }) |
1180 | 69 | return to_ascii(text)[:size].rjust(size) | 72 | return text.zfill(size) |
1181 | 70 | 73 | ||
1182 | 71 | def convert_float(cr, number, size, context): | 74 | def convert_int(self, cr, uid, number, size, context): |
1183 | 72 | text = str( int( round( number * 100, 0 ) ) ) | 75 | text = str( number ) |
1184 | 73 | if len(text) > size: | 76 | if len(text) > size: |
1185 | 74 | raise Log(_('Error:\n\nCan not convert float number %(number).2f to fit in %(size)d characters.') % { | 77 | raise Log( _('Error:\n\nCan not convert integer number %(number)d to fit in %(size)d characters.') % { |
1186 | 75 | 'number': number, | 78 | 'number': number, |
1187 | 76 | 'size': size | 79 | 'size': size |
1188 | 77 | }) | 80 | }) |
1189 | 78 | return text.zfill(size) | 81 | return text.zfill(size) |
1190 | 79 | 82 | ||
1191 | 80 | def convert_int(cr, number, size, context): | 83 | def convert(self, cr, uid, value, size, context, justified='left'): |
1192 | 81 | text = str( number ) | 84 | if value == False: |
1193 | 82 | if len(text) > size: | 85 | return self.convert_text(cr, uid, '', size) |
1194 | 83 | raise Log( _('Error:\n\nCan not convert integer number %(number)d to fit in %(size)d characters.') % { | 86 | elif isinstance(value, float): |
1195 | 84 | 'number': number, | 87 | return self.convert_float(cr, uid, value, size, context) |
1196 | 85 | 'size': size | 88 | elif isinstance(value, int): |
1197 | 86 | }) | 89 | return self.convert_int(cr, uid, value, size, context) |
1198 | 87 | return text.zfill(size) | 90 | else: |
1199 | 88 | 91 | return self.convert_text(cr, uid, value, size, justified) | |
1200 | 89 | def convert(cr, value, size, context, justified='left'): | 92 | |
1201 | 90 | if value == False: | 93 | def convert_bank_account(self, cr, uid, value, partner_name, context): |
1202 | 91 | return convert_text('', size) | 94 | if not isinstance(value, basestring): |
1203 | 92 | elif isinstance(value, float): | 95 | raise Log( _('User error:\n\nThe bank account number of %s is not defined.') % partner_name ) |
1204 | 93 | return convert_float(cr, value, size, context) | 96 | ccc = self.digits_only(cr, uid, value) |
1205 | 94 | elif isinstance(value, int): | 97 | if len(ccc) != 20: |
1206 | 95 | return convert_int(cr, value, size, context) | 98 | raise Log( _('User error:\n\nThe bank account number of %s does not have 20 digits.') % partner_name ) |
1207 | 96 | else: | 99 | return ccc |
1208 | 97 | return convert_text(value, size, justified) | 100 | |
1209 | 98 | 101 | def bank_account_parts(self, cr, uid, value, partner_name, context): | |
1210 | 99 | def convert_bank_account(cr, value, partner_name, context): | 102 | if not isinstance(value, basestring): |
1211 | 100 | if not isinstance(value, basestring): | 103 | raise Log( _('User error:\n\nThe bank account number of %s is not defined.') % partner_name ) |
1212 | 101 | raise Log( _('User error:\n\nThe bank account number of %s is not defined.') % partner_name ) | 104 | ccc = self.digits_only(cr, uid, value) |
1213 | 102 | ccc = digits_only(value) | 105 | if len(ccc) != 20: |
1214 | 103 | if len(ccc) != 20: | 106 | raise Log( _('User error:\n\nThe bank account number of %s does not have 20 digits.') % partner_name ) |
1215 | 104 | raise Log( _('User error:\n\nThe bank account number of %s does not have 20 digits.') % partner_name ) | 107 | return {'bank':ccc[:4], |
1216 | 105 | return ccc | 108 | 'office': ccc[4:8], |
1217 | 106 | 109 | 'dc': ccc[8:10], | |
1218 | 107 | def bank_account_parts(cr, value, partner_name, context): | 110 | 'account': ccc[10:]} |
1219 | 108 | if not isinstance(value, basestring): | 111 | |
1220 | 109 | raise Log( _('User error:\n\nThe bank account number of %s is not defined.') % partner_name ) | 112 | payment_converter_spain() |
1131 | 110 | ccc = digits_only(value) | ||
1132 | 111 | if len(ccc) != 20: | ||
1133 | 112 | raise Log( _('User error:\n\nThe bank account number of %s does not have 20 digits.') % partner_name ) | ||
1134 | 113 | return {'bank':ccc[:4], | ||
1135 | 114 | 'office': ccc[4:8], | ||
1136 | 115 | 'dc': ccc[8:10], | ||
1137 | 116 | 'account': ccc[10:]} | ||
1138 | 117 | |||
1139 | 118 | |||
1140 | 119 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
1221 | 120 | 113 | ||
1222 | 121 | 114 | ||
1223 | === modified file 'l10n_es_payment_order/wizard/csb_19.py' | |||
1224 | --- l10n_es_payment_order/wizard/csb_19.py 2012-06-12 09:33:58 +0000 | |||
1225 | +++ l10n_es_payment_order/wizard/csb_19.py 2013-01-11 10:23:22 +0000 | |||
1226 | @@ -21,6 +21,9 @@ | |||
1227 | 21 | # Añadidos conceptos extras del CSB 19: Acysos S.L. 2011 | 21 | # Añadidos conceptos extras del CSB 19: Acysos S.L. 2011 |
1228 | 22 | # Ignacio Ibeas <ignacio@acysos.com> | 22 | # Ignacio Ibeas <ignacio@acysos.com> |
1229 | 23 | # | 23 | # |
1230 | 24 | # Refactorización. Acysos S.L. (http://www.acysos.com) 2012 | ||
1231 | 25 | # Ignacio Ibeas <ignacio@acysos.com> | ||
1232 | 26 | # | ||
1233 | 24 | # This program is free software: you can redistribute it and/or modify | 27 | # This program is free software: you can redistribute it and/or modify |
1234 | 25 | # it under the terms of the GNU Affero General Public License as published by | 28 | # it under the terms of the GNU Affero General Public License as published by |
1235 | 26 | # the Free Software Foundation, either version 3 of the License, or | 29 | # the Free Software Foundation, either version 3 of the License, or |
1236 | @@ -36,20 +39,23 @@ | |||
1237 | 36 | # | 39 | # |
1238 | 37 | ############################################################################## | 40 | ############################################################################## |
1239 | 38 | 41 | ||
1240 | 42 | from osv import osv, fields | ||
1241 | 39 | from datetime import datetime | 43 | from datetime import datetime |
1242 | 40 | from tools.translate import _ | 44 | from tools.translate import _ |
1248 | 41 | from converter import * | 45 | from log import * |
1249 | 42 | 46 | ||
1250 | 43 | 47 | class csb_19(osv.osv): | |
1251 | 44 | class csb_19: | 48 | _name = 'csb.19' |
1252 | 45 | def _cabecera_presentador_19(self): | 49 | _auto = False |
1253 | 50 | def _cabecera_presentador_19(self,cr,uid): | ||
1254 | 51 | converter = self.pool.get('payment.converter.spain') | ||
1255 | 46 | texto = '5180' | 52 | texto = '5180' |
1256 | 47 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) | 53 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) |
1257 | 48 | texto += datetime.today().strftime('%d%m%y') | 54 | texto += datetime.today().strftime('%d%m%y') |
1258 | 49 | texto += 6*' ' | 55 | texto += 6*' ' |
1260 | 50 | texto += to_ascii(self.order.mode.nombre).ljust(40) | 56 | texto += converter.to_ascii(cr,uid,self.order.mode.nombre).ljust(40) |
1261 | 51 | texto += 20*' ' | 57 | texto += 20*' ' |
1263 | 52 | cc = digits_only(self.order.mode.bank_id.acc_number) | 58 | cc = converter.digits_only(cr,uid,self.order.mode.bank_id.acc_number) |
1264 | 53 | texto += cc[0:8] | 59 | texto += cc[0:8] |
1265 | 54 | texto += 66*' ' | 60 | texto += 66*' ' |
1266 | 55 | texto += '\r\n' | 61 | texto += '\r\n' |
1267 | @@ -57,7 +63,8 @@ | |||
1268 | 57 | raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Cabecera presentador 19', texto), True) | 63 | raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Cabecera presentador 19', texto), True) |
1269 | 58 | return texto | 64 | return texto |
1270 | 59 | 65 | ||
1272 | 60 | def _cabecera_ordenante_19(self, recibo=None): | 66 | def _cabecera_ordenante_19(self,cr,uid, recibo=None): |
1273 | 67 | converter = self.pool.get('payment.converter.spain') | ||
1274 | 61 | texto = '5380' | 68 | texto = '5380' |
1275 | 62 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) | 69 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) |
1276 | 63 | texto += datetime.today().strftime('%d%m%y') | 70 | texto += datetime.today().strftime('%d%m%y') |
1277 | @@ -78,8 +85,8 @@ | |||
1278 | 78 | date_cargo = datetime.strptime(self.order.date_scheduled,'%Y-%m-%d') | 85 | date_cargo = datetime.strptime(self.order.date_scheduled,'%Y-%m-%d') |
1279 | 79 | 86 | ||
1280 | 80 | texto += date_cargo.strftime('%d%m%y') | 87 | texto += date_cargo.strftime('%d%m%y') |
1283 | 81 | texto += to_ascii(self.order.mode.nombre).ljust(40) | 88 | texto += converter.to_ascii(cr,uid,self.order.mode.nombre).ljust(40) |
1284 | 82 | cc = digits_only(self.order.mode.bank_id.acc_number) | 89 | cc = converter.digits_only(cr,uid,self.order.mode.bank_id.acc_number) |
1285 | 83 | texto += cc[0:20] | 90 | texto += cc[0:20] |
1286 | 84 | texto += 8*' ' | 91 | texto += 8*' ' |
1287 | 85 | texto += '01' | 92 | texto += '01' |
1288 | @@ -89,14 +96,15 @@ | |||
1289 | 89 | raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Cabecera ordenante 19', texto), True) | 96 | raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Cabecera ordenante 19', texto), True) |
1290 | 90 | return texto | 97 | return texto |
1291 | 91 | 98 | ||
1293 | 92 | def _individual_obligatorio_19(self, recibo): | 99 | def _individual_obligatorio_19(self,cr,uid, recibo): |
1294 | 100 | converter = self.pool.get('payment.converter.spain') | ||
1295 | 93 | texto = '5680' | 101 | texto = '5680' |
1296 | 94 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) | 102 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) |
1297 | 95 | texto += str(recibo['name'])[-12:].zfill(12) | 103 | texto += str(recibo['name'])[-12:].zfill(12) |
1299 | 96 | nombre = to_ascii(recibo['partner_id'].name) | 104 | nombre = converter.to_ascii(cr,uid,recibo['partner_id'].name) |
1300 | 97 | texto += nombre[0:40].ljust(40) | 105 | texto += nombre[0:40].ljust(40) |
1301 | 98 | ccc = recibo['bank_id'] and recibo['bank_id'].acc_number or '' | 106 | ccc = recibo['bank_id'] and recibo['bank_id'].acc_number or '' |
1303 | 99 | ccc = digits_only(ccc) | 107 | ccc = converter.digits_only(cr,uid,ccc) |
1304 | 100 | texto += str(ccc)[0:20].zfill(20) | 108 | texto += str(ccc)[0:20].zfill(20) |
1305 | 101 | importe = int(round(abs(recibo['amount'])*100,0)) | 109 | importe = int(round(abs(recibo['amount'])*100,0)) |
1306 | 102 | texto += str(importe).zfill(10) | 110 | texto += str(importe).zfill(10) |
1307 | @@ -104,21 +112,19 @@ | |||
1308 | 104 | concepto = '' | 112 | concepto = '' |
1309 | 105 | if recibo['communication']: | 113 | if recibo['communication']: |
1310 | 106 | concepto = recibo['communication'] | 114 | concepto = recibo['communication'] |
1315 | 107 | texto += to_ascii(concepto)[0:48].ljust(48) | 115 | texto += converter.to_ascii(cr,uid,concepto)[0:48].ljust(48) |
1312 | 108 | # Esto es lo convencional, descripción de 40 caracteres, pero se puede aprovechar los 8 espacios en blanco finales | ||
1313 | 109 | #texto += to_ascii(concepto)[0:40].ljust(40) | ||
1314 | 110 | #texto += 8*' ' | ||
1316 | 111 | texto += '\r\n' | 116 | texto += '\r\n' |
1317 | 112 | if len(texto) != 164: | 117 | if len(texto) != 164: |
1318 | 113 | raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Individual obligatorio 19', texto), True) | 118 | raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Individual obligatorio 19', texto), True) |
1319 | 114 | return texto | 119 | return texto |
1320 | 115 | 120 | ||
1322 | 116 | def _individual_opcional_19(self, recibo): | 121 | def _individual_opcional_19(self,cr,uid, recibo): |
1323 | 117 | """Para poner el segundo texto de comunicación (en lugar de nombre, domicilio y localidad opcional)""" | 122 | """Para poner el segundo texto de comunicación (en lugar de nombre, domicilio y localidad opcional)""" |
1324 | 123 | converter = self.pool.get('payment.converter.spain') | ||
1325 | 118 | texto = '5686' | 124 | texto = '5686' |
1326 | 119 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) | 125 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) |
1327 | 120 | texto += str(recibo['name'])[-12:].zfill(12) | 126 | texto += str(recibo['name'])[-12:].zfill(12) |
1329 | 121 | texto += to_ascii(recibo['communication2'])[0:115].ljust(115) | 127 | texto += converter.to_ascii(cr,uid,recibo['communication2'])[0:115].ljust(115) |
1330 | 122 | texto += '00000' # Campo de código postal ficticio | 128 | texto += '00000' # Campo de código postal ficticio |
1331 | 123 | texto += 14*' ' | 129 | texto += 14*' ' |
1332 | 124 | texto += '\r\n' | 130 | texto += '\r\n' |
1333 | @@ -126,36 +132,37 @@ | |||
1334 | 126 | raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Individual opcional 19', texto), True) | 132 | raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Individual opcional 19', texto), True) |
1335 | 127 | return texto | 133 | return texto |
1336 | 128 | 134 | ||
1338 | 129 | def _extra_opcional_19(self, recibo): | 135 | def _extra_opcional_19(self,cr,uid, recibo): |
1339 | 130 | """Para poner los 15 conceptos opcional de los registros 5681-5685 utilizando las lineas de facturación (Máximo 15 lineas)""" | 136 | """Para poner los 15 conceptos opcional de los registros 5681-5685 utilizando las lineas de facturación (Máximo 15 lineas)""" |
1340 | 137 | converter = self.pool.get('payment.converter.spain') | ||
1341 | 131 | res = {} | 138 | res = {} |
1342 | 132 | res['texto'] = '' | 139 | res['texto'] = '' |
1343 | 133 | res['total_lines'] = 0 | 140 | res['total_lines'] = 0 |
1344 | 134 | counter = 1 | 141 | counter = 1 |
1345 | 135 | registry_counter = 1 | 142 | registry_counter = 1 |
1347 | 136 | lenght = 0 | 143 | length = 0 |
1348 | 137 | for invoice in recibo['ml_inv_ref']: | 144 | for invoice in recibo['ml_inv_ref']: |
1349 | 138 | if invoice: | 145 | if invoice: |
1351 | 139 | lenght += len(invoice.invoice_line) | 146 | length += len(invoice.invoice_line) |
1352 | 140 | for invoice in recibo['ml_inv_ref']: | 147 | for invoice in recibo['ml_inv_ref']: |
1353 | 141 | if invoice: | 148 | if invoice: |
1354 | 142 | for invoice_line in invoice.invoice_line: | 149 | for invoice_line in invoice.invoice_line: |
1356 | 143 | if counter <= lenght: | 150 | if counter <= length: |
1357 | 144 | if counter <= 15: | 151 | if counter <= 15: |
1358 | 145 | if (counter-1)%3 == 0: | 152 | if (counter-1)%3 == 0: |
1359 | 146 | res['texto'] += '568'+str(registry_counter) | 153 | res['texto'] += '568'+str(registry_counter) |
1360 | 147 | res['texto'] += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) | 154 | res['texto'] += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) |
1361 | 148 | res['texto'] += str(recibo['name']).zfill(12) | 155 | res['texto'] += str(recibo['name']).zfill(12) |
1362 | 149 | price = ' %(#).2f ' % {'#' : invoice_line.price_subtotal} | 156 | price = ' %(#).2f ' % {'#' : invoice_line.price_subtotal} |
1365 | 150 | res['texto'] += to_ascii(invoice_line.name)[0:(40-len(price))].ljust(40-len(price)) | 157 | res['texto'] += converter.to_ascii(cr,uid,invoice_line.name)[0:(40-len(price))].ljust(40-len(price)) |
1366 | 151 | res['texto'] += to_ascii(price.replace('.',',')) | 158 | res['texto'] += converter.to_ascii(cr,uid,price.replace('.',',')) |
1367 | 152 | if counter % 3 == 0: | 159 | if counter % 3 == 0: |
1368 | 153 | res['texto'] += 14*' '+'\r\n' | 160 | res['texto'] += 14*' '+'\r\n' |
1369 | 154 | res['total_lines'] += 1 | 161 | res['total_lines'] += 1 |
1370 | 155 | if len(res['texto']) != registry_counter*164: | 162 | if len(res['texto']) != registry_counter*164: |
1371 | 156 | raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Individual opcional 19', res['texto']), True) | 163 | raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Individual opcional 19', res['texto']), True) |
1372 | 157 | registry_counter += 1 | 164 | registry_counter += 1 |
1374 | 158 | elif counter == lenght: | 165 | elif counter == length: |
1375 | 159 | res['texto'] += (3-(counter % 3))*40*' '+14*' '+'\r\n' | 166 | res['texto'] += (3-(counter % 3))*40*' '+14*' '+'\r\n' |
1376 | 160 | res['total_lines'] += 1 | 167 | res['total_lines'] += 1 |
1377 | 161 | if len(res['texto']) != registry_counter*164: | 168 | if len(res['texto']) != registry_counter*164: |
1378 | @@ -163,7 +170,7 @@ | |||
1379 | 163 | counter += 1 | 170 | counter += 1 |
1380 | 164 | return res | 171 | return res |
1381 | 165 | 172 | ||
1383 | 166 | def _total_ordenante_19(self): | 173 | def _total_ordenante_19(self,cr,uid): |
1384 | 167 | texto = '5880' | 174 | texto = '5880' |
1385 | 168 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) | 175 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) |
1386 | 169 | texto += 72*' ' | 176 | texto += 72*' ' |
1387 | @@ -178,7 +185,7 @@ | |||
1388 | 178 | raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Total ordenante 19', texto), True) | 185 | raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Total ordenante 19', texto), True) |
1389 | 179 | return texto | 186 | return texto |
1390 | 180 | 187 | ||
1392 | 181 | def _total_general_19(self): | 188 | def _total_general_19(self,cr,uid): |
1393 | 182 | texto = '5980' | 189 | texto = '5980' |
1394 | 183 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) | 190 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) |
1395 | 184 | texto += 52*' ' | 191 | texto += 52*' ' |
1396 | @@ -206,7 +213,7 @@ | |||
1397 | 206 | return texto | 213 | return texto |
1398 | 207 | 214 | ||
1399 | 208 | 215 | ||
1401 | 209 | def create_file(self, pool, cr, uid, order, lines, context): | 216 | def create_file(self, cr, uid, order, lines, context): |
1402 | 210 | self.order = order | 217 | self.order = order |
1403 | 211 | 218 | ||
1404 | 212 | txt_remesa = '' | 219 | txt_remesa = '' |
1405 | @@ -216,7 +223,7 @@ | |||
1406 | 216 | self.group_optional_lines = 0 | 223 | self.group_optional_lines = 0 |
1407 | 217 | self.group_amount = 0.0 | 224 | self.group_amount = 0.0 |
1408 | 218 | 225 | ||
1410 | 219 | txt_remesa += self._cabecera_presentador_19() | 226 | txt_remesa += self._cabecera_presentador_19(cr,uid) |
1411 | 220 | 227 | ||
1412 | 221 | if order.date_prefered == 'due': | 228 | if order.date_prefered == 'due': |
1413 | 222 | # Tantos ordenantes como pagos | 229 | # Tantos ordenantes como pagos |
1414 | @@ -225,48 +232,46 @@ | |||
1415 | 225 | self.group_optional_lines = 0 | 232 | self.group_optional_lines = 0 |
1416 | 226 | self.group_amount = 0.0 | 233 | self.group_amount = 0.0 |
1417 | 227 | 234 | ||
1420 | 228 | txt_remesa += self._cabecera_ordenante_19(recibo) | 235 | txt_remesa += self._cabecera_ordenante_19(cr,uid,recibo) |
1421 | 229 | txt_remesa += self._individual_obligatorio_19(recibo) | 236 | txt_remesa += self._individual_obligatorio_19(cr,uid,recibo) |
1422 | 230 | self.total_payments += 1 | 237 | self.total_payments += 1 |
1423 | 231 | self.group_payments += 1 | 238 | self.group_payments += 1 |
1424 | 232 | self.group_amount += abs( recibo['amount'] ) | 239 | self.group_amount += abs( recibo['amount'] ) |
1425 | 233 | if order.mode.csb19_extra_concepts: | 240 | if order.mode.csb19_extra_concepts: |
1427 | 234 | extra_concepts = self._extra_opcional_19(recibo) | 241 | extra_concepts = self._extra_opcional_19(cr,uid,recibo) |
1428 | 235 | txt_remesa += extra_concepts['texto'] | 242 | txt_remesa += extra_concepts['texto'] |
1429 | 236 | self.total_optional_lines += extra_concepts['total_lines'] | 243 | self.total_optional_lines += extra_concepts['total_lines'] |
1430 | 237 | self.group_optional_lines += extra_concepts['total_lines'] | 244 | self.group_optional_lines += extra_concepts['total_lines'] |
1431 | 238 | 245 | ||
1432 | 239 | if recibo['communication2']: | 246 | if recibo['communication2']: |
1435 | 240 | txt_remesa += self._individual_opcional_19(recibo) | 247 | txt_remesa += self._individual_opcional_19(cr,uid,recibo) |
1434 | 241 | #self.num_lineas_opc = self.num_lineas_opc + 1 | ||
1436 | 242 | self.total_optional_lines += 1 | 248 | self.total_optional_lines += 1 |
1437 | 243 | self.group_optional_lines += 1 | 249 | self.group_optional_lines += 1 |
1439 | 244 | txt_remesa += self._total_ordenante_19() | 250 | txt_remesa += self._total_ordenante_19(cr,uid) |
1440 | 245 | else: | 251 | else: |
1441 | 246 | # Sólo un ordenante | 252 | # Sólo un ordenante |
1443 | 247 | txt_remesa += self._cabecera_ordenante_19() | 253 | txt_remesa += self._cabecera_ordenante_19(cr,uid) |
1444 | 248 | self.group_payments = 0 | 254 | self.group_payments = 0 |
1445 | 249 | self.group_optional_lines = 0 | 255 | self.group_optional_lines = 0 |
1446 | 250 | self.group_amount = 0.0 | 256 | self.group_amount = 0.0 |
1447 | 251 | 257 | ||
1448 | 252 | for recibo in lines: | 258 | for recibo in lines: |
1450 | 253 | txt_remesa += self._individual_obligatorio_19(recibo) | 259 | txt_remesa += self._individual_obligatorio_19(cr,uid,recibo) |
1451 | 254 | self.total_payments += 1 | 260 | self.total_payments += 1 |
1452 | 255 | self.group_payments += 1 | 261 | self.group_payments += 1 |
1453 | 256 | self.group_amount += abs( recibo['amount'] ) | 262 | self.group_amount += abs( recibo['amount'] ) |
1454 | 257 | if order.mode.csb19_extra_concepts: | 263 | if order.mode.csb19_extra_concepts: |
1456 | 258 | extra_concepts = self._extra_opcional_19(recibo) | 264 | extra_concepts = self._extra_opcional_19(cr,uid,recibo) |
1457 | 259 | txt_remesa += extra_concepts['texto'] | 265 | txt_remesa += extra_concepts['texto'] |
1458 | 260 | self.total_optional_lines += extra_concepts['total_lines'] | 266 | self.total_optional_lines += extra_concepts['total_lines'] |
1459 | 261 | self.group_optional_lines += extra_concepts['total_lines'] | 267 | self.group_optional_lines += extra_concepts['total_lines'] |
1460 | 262 | if recibo['communication2']: | 268 | if recibo['communication2']: |
1462 | 263 | txt_remesa += self._individual_opcional_19(recibo) | 269 | txt_remesa += self._individual_opcional_19(cr,uid,recibo) |
1463 | 264 | self.total_optional_lines += 1 | 270 | self.total_optional_lines += 1 |
1464 | 265 | self.group_optional_lines += 1 | 271 | self.group_optional_lines += 1 |
1465 | 266 | 272 | ||
1467 | 267 | txt_remesa += self._total_ordenante_19() | 273 | txt_remesa += self._total_ordenante_19(cr,uid) |
1468 | 268 | 274 | ||
1470 | 269 | txt_remesa += self._total_general_19() | 275 | txt_remesa += self._total_general_19(cr,uid) |
1471 | 270 | return txt_remesa | 276 | return txt_remesa |
1474 | 271 | 277 | csb_19() | |
1473 | 272 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
1475 | 273 | \ No newline at end of file | 278 | \ No newline at end of file |
1476 | 274 | 279 | ||
1477 | === modified file 'l10n_es_payment_order/wizard/csb_32.py' | |||
1478 | --- l10n_es_payment_order/wizard/csb_32.py 2011-08-29 15:11:11 +0000 | |||
1479 | +++ l10n_es_payment_order/wizard/csb_32.py 2013-01-11 10:23:22 +0000 | |||
1480 | @@ -18,6 +18,9 @@ | |||
1481 | 18 | # Rehecho de nuevo para instalación OpenERP 5.0.0 sobre account_payment_extension: Zikzakmedia S.L. 2009 | 18 | # Rehecho de nuevo para instalación OpenERP 5.0.0 sobre account_payment_extension: Zikzakmedia S.L. 2009 |
1482 | 19 | # Jordi Esteve <jesteve@zikzakmedia.com> | 19 | # Jordi Esteve <jesteve@zikzakmedia.com> |
1483 | 20 | # | 20 | # |
1484 | 21 | # Refactorización. Acysos S.L. (http://www.acysos.com) 2012 | ||
1485 | 22 | # Ignacio Ibeas <ignacio@acysos.com> | ||
1486 | 23 | # | ||
1487 | 21 | # This program is free software: you can redistribute it and/or modify | 24 | # This program is free software: you can redistribute it and/or modify |
1488 | 22 | # it under the terms of the GNU Affero General Public License as published by | 25 | # it under the terms of the GNU Affero General Public License as published by |
1489 | 23 | # the Free Software Foundation, either version 3 of the License, or | 26 | # the Free Software Foundation, either version 3 of the License, or |
1490 | @@ -33,20 +36,22 @@ | |||
1491 | 33 | # | 36 | # |
1492 | 34 | ############################################################################## | 37 | ############################################################################## |
1493 | 35 | 38 | ||
1494 | 39 | from osv import osv, fields | ||
1495 | 36 | from datetime import datetime | 40 | from datetime import datetime |
1496 | 37 | from tools.translate import _ | 41 | from tools.translate import _ |
1503 | 38 | from converter import * | 42 | from log import * |
1504 | 39 | 43 | ||
1505 | 40 | 44 | class csb_32(osv.osv): | |
1506 | 41 | class csb_32: | 45 | _name = 'csb.32' |
1507 | 42 | 46 | _auto = False | |
1508 | 43 | def _cabecera_fichero_32(self): | 47 | def _cabecera_fichero_32(self, cr, uid): |
1509 | 48 | converter = self.pool.get('payment.converter.spain') | ||
1510 | 44 | texto = '0265' | 49 | texto = '0265' |
1511 | 45 | texto += ' ' | 50 | texto += ' ' |
1512 | 46 | texto += datetime.today().strftime('%d%m%y') | 51 | texto += datetime.today().strftime('%d%m%y') |
1514 | 47 | texto += digits_only( self.order.reference )[-4:] | 52 | texto += converter.digits_only(cr, uid, self.order.reference )[-4:] |
1515 | 48 | texto += ' '*35 | 53 | texto += ' '*35 |
1517 | 49 | texto += digits_only( self.order.mode.bank_id.acc_number )[:8] | 54 | texto += converter.digits_only(cr, uid, self.order.mode.bank_id.acc_number )[:8] |
1518 | 50 | texto += ' '*6 | 55 | texto += ' '*6 |
1519 | 51 | texto += ' '*61 | 56 | texto += ' '*61 |
1520 | 52 | texto += ' '*24 | 57 | texto += ' '*24 |
1521 | @@ -55,7 +60,8 @@ | |||
1522 | 55 | raise Log(_('Configuration error:\n\nThe line "%s" is not 150 characters long:\n%s') % ('Cabecera fichero 32', texto), True) | 60 | raise Log(_('Configuration error:\n\nThe line "%s" is not 150 characters long:\n%s') % ('Cabecera fichero 32', texto), True) |
1523 | 56 | return texto | 61 | return texto |
1524 | 57 | 62 | ||
1526 | 58 | def _cabecera_remesa_32(self, cr, context): | 63 | def _cabecera_remesa_32(self, cr, uid, context): |
1527 | 64 | converter = self.pool.get('payment.converter.spain') | ||
1528 | 59 | # A: | 65 | # A: |
1529 | 60 | texto = '1165' | 66 | texto = '1165' |
1530 | 61 | texto += ' ' | 67 | texto += ' ' |
1531 | @@ -66,42 +72,43 @@ | |||
1532 | 66 | texto += ' '*12 | 72 | texto += ' '*12 |
1533 | 67 | 73 | ||
1534 | 68 | # C | 74 | # C |
1536 | 69 | texto += convert(cr, self.order.mode.cedente, 15, context) # TODO: Identificador del cedente. Qué es? | 75 | texto += converter.convert(cr, uid, self.order.mode.cedente, 15, context) # TODO: Identificador del cedente. Qué es? |
1537 | 70 | texto += '1' # Identificativo de efectos truncados | 76 | texto += '1' # Identificativo de efectos truncados |
1538 | 71 | texto += ' '*21 | 77 | texto += ' '*21 |
1539 | 72 | 78 | ||
1540 | 73 | # D | 79 | # D |
1544 | 74 | texto += digits_only( self.order.mode.bank_id.acc_number ) | 80 | texto += converter.digits_only(cr, uid, self.order.mode.bank_id.acc_number ) |
1545 | 75 | texto += digits_only( self.order.mode.bank_id.acc_number ) | 81 | texto += converter.digits_only(cr, uid, self.order.mode.bank_id.acc_number ) |
1546 | 76 | texto += digits_only( self.order.mode.bank_id.acc_number ) | 82 | texto += converter.digits_only(cr, uid, self.order.mode.bank_id.acc_number ) |
1547 | 77 | texto += ' ' + ' '*24 | 83 | texto += ' ' + ' '*24 |
1548 | 78 | texto += '\r\n' | 84 | texto += '\r\n' |
1549 | 79 | if len(texto) != 152: | 85 | if len(texto) != 152: |
1550 | 80 | raise Log(_('Configuration error:\n\nThe line "%s" is not 150 characters long:\n%s') % ('Cabecera remesa 32', texto), True) | 86 | raise Log(_('Configuration error:\n\nThe line "%s" is not 150 characters long:\n%s') % ('Cabecera remesa 32', texto), True) |
1551 | 81 | return texto | 87 | return texto |
1552 | 82 | 88 | ||
1554 | 83 | def _registro_individual_i_32(self, cr, recibo, context): | 89 | def _registro_individual_i_32(self, cr, uid, recibo, context): |
1555 | 90 | converter = self.pool.get('payment.converter.spain') | ||
1556 | 84 | # A | 91 | # A |
1557 | 85 | texto = '2565' | 92 | texto = '2565' |
1558 | 86 | texto += ' ' | 93 | texto += ' ' |
1559 | 87 | # B | 94 | # B |
1561 | 88 | texto += convert(cr, self.num_recibos+1, 15, context) | 95 | texto += converter.convert(cr, uid, self.num_recibos+1, 15, context) |
1562 | 89 | texto += datetime.today().strftime('%d%m%y') | 96 | texto += datetime.today().strftime('%d%m%y') |
1563 | 90 | texto += '0001' | 97 | texto += '0001' |
1564 | 91 | 98 | ||
1565 | 92 | # C | 99 | # C |
1566 | 93 | state = self.order.mode.bank_id.state_id and self.order.mode.bank_id.state_id.code or False | 100 | state = self.order.mode.bank_id.state_id and self.order.mode.bank_id.state_id.code or False |
1568 | 94 | texto += convert(cr, state, 2, context) | 101 | texto += converter.convert(cr, uid, state, 2, context) |
1569 | 95 | texto += ' '*7 | 102 | texto += ' '*7 |
1570 | 96 | texto += ' ' | 103 | texto += ' ' |
1571 | 97 | 104 | ||
1572 | 98 | # D | 105 | # D |
1574 | 99 | texto += convert(cr, self.order.mode.bank_id.city, 20, context) | 106 | texto += converter.convert(cr, uid, self.order.mode.bank_id.city, 20, context) |
1575 | 100 | texto += ' ' | 107 | texto += ' ' |
1576 | 101 | 108 | ||
1577 | 102 | # E | 109 | # E |
1578 | 103 | texto += ' '*24 | 110 | texto += ' '*24 |
1580 | 104 | texto += convert(cr, abs(recibo['amount']), 9, context) | 111 | texto += converter.convert(cr, uid, abs(recibo['amount']), 9, context) |
1581 | 105 | texto += ' '*15 | 112 | texto += ' '*15 |
1582 | 106 | texto += datetime.strptime( recibo['ml_maturity_date'], '%Y-%m-%d').strftime('%d%m%y') | 113 | texto += datetime.strptime( recibo['ml_maturity_date'], '%Y-%m-%d').strftime('%d%m%y') |
1583 | 107 | texto += ' '*(6+6+1+4+16) | 114 | texto += ' '*(6+6+1+4+16) |
1584 | @@ -110,13 +117,14 @@ | |||
1585 | 110 | raise Log(_('Configuration error:\n\nThe line "%s" is not 150 characters long:\n%s') % ('Registro individual I 32', texto), True) | 117 | raise Log(_('Configuration error:\n\nThe line "%s" is not 150 characters long:\n%s') % ('Registro individual I 32', texto), True) |
1586 | 111 | return texto | 118 | return texto |
1587 | 112 | 119 | ||
1589 | 113 | def _registro_individual_ii_32(self, cr, recibo, context): | 120 | def _registro_individual_ii_32(self, cr, uid, recibo, context): |
1590 | 121 | converter = self.pool.get('payment.converter.spain') | ||
1591 | 114 | # A: Identificacion de la operacion | 122 | # A: Identificacion de la operacion |
1592 | 115 | texto = '2665' | 123 | texto = '2665' |
1593 | 116 | texto += ' ' | 124 | texto += ' ' |
1594 | 117 | 125 | ||
1595 | 118 | # B: Datos del efecto | 126 | # B: Datos del efecto |
1597 | 119 | texto += convert(cr, self.num_recibos+1, 15, context) | 127 | texto += converter.convert(cr, uid, self.num_recibos+1, 15, context) |
1598 | 120 | texto += ' ' | 128 | texto += ' ' |
1599 | 121 | texto += '2' # Recibo | 129 | texto += '2' # Recibo |
1600 | 122 | texto += '000000' | 130 | texto += '000000' |
1601 | @@ -132,42 +140,44 @@ | |||
1602 | 132 | texto += ' '*20 | 140 | texto += ' '*20 |
1603 | 133 | 141 | ||
1604 | 134 | # D: Datos del efecto | 142 | # D: Datos del efecto |
1607 | 135 | texto += convert(cr, self.order.mode.partner_id.name, 34, context) | 143 | texto += converter.convert(cr, uid, self.order.mode.partner_id.name, 34, context) |
1608 | 136 | texto += convert(cr, recibo['partner_id'].name, 34, context) | 144 | texto += converter.convert(cr, uid, recibo['partner_id'].name, 34, context) |
1609 | 137 | texto += ' '*30 | 145 | texto += ' '*30 |
1610 | 138 | texto += '\r\n' | 146 | texto += '\r\n' |
1611 | 139 | if len(texto) != 152: | 147 | if len(texto) != 152: |
1612 | 140 | raise Log(_('Configuration error:\n\nThe line "%s" is not 150 characters long:\n%s') % ('Registro individual II 32', texto), True) | 148 | raise Log(_('Configuration error:\n\nThe line "%s" is not 150 characters long:\n%s') % ('Registro individual II 32', texto), True) |
1613 | 141 | return texto | 149 | return texto |
1614 | 142 | 150 | ||
1616 | 143 | def _registro_individual_iii_32(self, cr, recibo, context): | 151 | def _registro_individual_iii_32(self, cr, uid, recibo, context): |
1617 | 152 | converter = self.pool.get('payment.converter.spain') | ||
1618 | 144 | # A: Identificacion de la operacion | 153 | # A: Identificacion de la operacion |
1619 | 145 | texto = '2765' | 154 | texto = '2765' |
1620 | 146 | texto += ' ' | 155 | texto += ' ' |
1621 | 147 | 156 | ||
1622 | 148 | # B: Datos del efecto | 157 | # B: Datos del efecto |
1624 | 149 | texto += convert(cr, self.num_recibos+1, 15, context) | 158 | texto += converter.convert(cr, uid, self.num_recibos+1, 15, context) |
1625 | 150 | texto += ' ' | 159 | texto += ' ' |
1627 | 151 | addresses = self.pool.get('res.partner').address_get(self.cr, self.uid, [recibo['partner_id'].id] ) | 160 | addresses = self.pool.get('res.partner').address_get(cr, uid, [recibo['partner_id'].id] ) |
1628 | 152 | #if not addresses: | 161 | #if not addresses: |
1629 | 153 | # print "NO ADDRESSES" | 162 | # print "NO ADDRESSES" |
1635 | 154 | address = self.pool.get('res.partner.address').browse(self.cr, self.uid, addresses['default'], self.context) | 163 | address = self.pool.get('res.partner.address').browse(cr, uid, addresses['default'], context) |
1636 | 155 | texto += convert( cr, address.street, 34, context ) | 164 | texto += converter.convert( cr, uid, address.street, 34, context ) |
1637 | 156 | texto += convert( cr, address.zip, 5, context ) | 165 | texto += converter.convert( cr, uid, address.zip, 5, context ) |
1638 | 157 | texto += convert( cr, address.city, 20, context ) | 166 | texto += converter.convert( cr, uid, address.city, 20, context ) |
1639 | 158 | texto += convert( cr, address.state_id and address.state_id.code or False, 2, context ) | 167 | texto += converter.convert( cr, uid, address.state_id and address.state_id.code or False, 2, context ) |
1640 | 159 | texto += '0'*7 | 168 | texto += '0'*7 |
1641 | 160 | 169 | ||
1642 | 161 | # C: Datos del efecto | 170 | # C: Datos del efecto |
1643 | 162 | vat = recibo['partner_id'].vat and recibo['partner_id'].vat[2:] or False | 171 | vat = recibo['partner_id'].vat and recibo['partner_id'].vat[2:] or False |
1645 | 163 | texto += convert(cr, vat, 9, context) | 172 | texto += converter.convert(cr, uid, vat, 9, context) |
1646 | 164 | texto += ' '*50 | 173 | texto += ' '*50 |
1647 | 165 | texto += '\r\n' | 174 | texto += '\r\n' |
1648 | 166 | if len(texto) != 152: | 175 | if len(texto) != 152: |
1649 | 167 | raise Log(_('Configuration error:\n\nThe line "%s" is not 150 characters long:\n%s') % ('Registro individual III 32', texto), True) | 176 | raise Log(_('Configuration error:\n\nThe line "%s" is not 150 characters long:\n%s') % ('Registro individual III 32', texto), True) |
1650 | 168 | return texto | 177 | return texto |
1651 | 169 | 178 | ||
1653 | 170 | def _registro_fin_remesa_32(self, cr, context): | 179 | def _registro_fin_remesa_32(self, cr, uid, context): |
1654 | 180 | converter = self.pool.get('payment.converter.spain') | ||
1655 | 171 | # A: Identificación de la operación | 181 | # A: Identificación de la operación |
1656 | 172 | texto = '7165' | 182 | texto = '7165' |
1657 | 173 | texto += ' ' | 183 | texto += ' ' |
1658 | @@ -182,20 +192,21 @@ | |||
1659 | 182 | 192 | ||
1660 | 183 | # D: Acumuladores de importe | 193 | # D: Acumuladores de importe |
1661 | 184 | texto += ' '*10 | 194 | texto += ' '*10 |
1663 | 185 | texto += convert( cr, abs(self.order.total), 10, context ) | 195 | texto += converter.convert( cr, uid, abs(self.order.total), 10, context ) |
1664 | 186 | texto += ' '*(10+6+7+6+6+6) | 196 | texto += ' '*(10+6+7+6+6+6) |
1665 | 187 | 197 | ||
1666 | 188 | # E: Controles de lectura de fichero | 198 | # E: Controles de lectura de fichero |
1667 | 189 | texto += ' '*5 | 199 | texto += ' '*5 |
1670 | 190 | texto += convert(cr, (self.num_recibos*3) + 2, 7, context) | 200 | texto += converter.convert(cr, uid, (self.num_recibos*3) + 2, 7, context) |
1671 | 191 | texto += convert(cr, self.num_recibos, 6, context) | 201 | texto += converter.convert(cr, uid, self.num_recibos, 6, context) |
1672 | 192 | texto += ' '*6 | 202 | texto += ' '*6 |
1673 | 193 | texto += '\r\n' | 203 | texto += '\r\n' |
1674 | 194 | if len(texto) != 152: | 204 | if len(texto) != 152: |
1675 | 195 | raise Log(_('Configuration error:\n\nThe line "%s" is not 150 characters long:\n%s') % ('Fin remesa 32', texto), True) | 205 | raise Log(_('Configuration error:\n\nThe line "%s" is not 150 characters long:\n%s') % ('Fin remesa 32', texto), True) |
1676 | 196 | return texto | 206 | return texto |
1677 | 197 | 207 | ||
1679 | 198 | def _registro_fin_fichero_32(self, cr, context): | 208 | def _registro_fin_fichero_32(self, cr, uid, context): |
1680 | 209 | converter = self.pool.get('payment.converter.spain') | ||
1681 | 199 | # A: Identificación de la operación | 210 | # A: Identificación de la operación |
1682 | 200 | texto = '9865' | 211 | texto = '9865' |
1683 | 201 | texto += ' ' | 212 | texto += ' ' |
1684 | @@ -208,40 +219,35 @@ | |||
1685 | 208 | 219 | ||
1686 | 209 | # D: Acumuladores de importes | 220 | # D: Acumuladores de importes |
1687 | 210 | texto += ' '*10 | 221 | texto += ' '*10 |
1689 | 211 | texto += convert( cr, abs(self.order.total), 10, context ) | 222 | texto += converter.convert( cr, uid, abs(self.order.total), 10, context ) |
1690 | 212 | texto += ' '*(10+6+7+6+6+6) | 223 | texto += ' '*(10+6+7+6+6+6) |
1691 | 213 | 224 | ||
1692 | 214 | # E: Controles de lectura del fichero | 225 | # E: Controles de lectura del fichero |
1693 | 215 | texto += '00001' | 226 | texto += '00001' |
1696 | 216 | texto += convert(cr, (self.num_recibos*3) + 3, 7, context) | 227 | texto += converter.convert(cr, uid, (self.num_recibos*3) + 3, 7, context) |
1697 | 217 | texto += convert(cr, self.num_recibos, 6, context) | 228 | texto += converter.convert(cr, uid, self.num_recibos, 6, context) |
1698 | 218 | texto += ' '*6 | 229 | texto += ' '*6 |
1699 | 219 | texto += '\r\n' | 230 | texto += '\r\n' |
1700 | 220 | if len(texto) != 152: | 231 | if len(texto) != 152: |
1701 | 221 | raise Log(_('Configuration error:\n\nThe line "%s" is not 150 characters long:\n%s') % ('Fin fichero 32', texto), True) | 232 | raise Log(_('Configuration error:\n\nThe line "%s" is not 150 characters long:\n%s') % ('Fin fichero 32', texto), True) |
1702 | 222 | return texto | 233 | return texto |
1703 | 223 | 234 | ||
1708 | 224 | def create_file(self, pool, cr, uid, order, lines, context): | 235 | def create_file(self, cr, uid, order, lines, context): |
1705 | 225 | self.pool = pool | ||
1706 | 226 | self.cr = cr | ||
1707 | 227 | self.uid = uid | ||
1709 | 228 | self.order = order | 236 | self.order = order |
1710 | 229 | self.context = context | ||
1711 | 230 | 237 | ||
1712 | 231 | txt_remesa = '' | 238 | txt_remesa = '' |
1713 | 232 | self.num_recibos = 0 | 239 | self.num_recibos = 0 |
1714 | 233 | self.num_lineas_opc = 0 | 240 | self.num_lineas_opc = 0 |
1715 | 234 | 241 | ||
1718 | 235 | txt_remesa += self._cabecera_fichero_32() | 242 | txt_remesa += self._cabecera_fichero_32(cr,uid) |
1719 | 236 | txt_remesa += self._cabecera_remesa_32(cr, context) | 243 | txt_remesa += self._cabecera_remesa_32(cr, uid, context) |
1720 | 237 | for recibo in lines: | 244 | for recibo in lines: |
1724 | 238 | txt_remesa += self._registro_individual_i_32(cr, recibo, context) | 245 | txt_remesa += self._registro_individual_i_32(cr, uid, recibo, context) |
1725 | 239 | txt_remesa += self._registro_individual_ii_32(cr, recibo, context) | 246 | txt_remesa += self._registro_individual_ii_32(cr, uid, recibo, context) |
1726 | 240 | txt_remesa += self._registro_individual_iii_32(cr, recibo, context) | 247 | txt_remesa += self._registro_individual_iii_32(cr, uid, recibo, context) |
1727 | 241 | self.num_recibos = self.num_recibos + 1 | 248 | self.num_recibos = self.num_recibos + 1 |
1730 | 242 | txt_remesa += self._registro_fin_remesa_32(cr, context) | 249 | txt_remesa += self._registro_fin_remesa_32(cr, uid, context) |
1731 | 243 | txt_remesa += self._registro_fin_fichero_32(cr, context) | 250 | txt_remesa += self._registro_fin_fichero_32(cr, uid, context) |
1732 | 244 | return txt_remesa | 251 | return txt_remesa |
1733 | 245 | 252 | ||
1736 | 246 | 253 | csb_32() | |
1735 | 247 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
1737 | 248 | 254 | ||
1738 | === modified file 'l10n_es_payment_order/wizard/csb_34.py' | |||
1739 | --- l10n_es_payment_order/wizard/csb_34.py 2011-09-20 06:47:43 +0000 | |||
1740 | +++ l10n_es_payment_order/wizard/csb_34.py 2013-01-11 10:23:22 +0000 | |||
1741 | @@ -20,6 +20,9 @@ | |||
1742 | 20 | # Rehecho de nuevo para instalación OpenERP 5.0.0 sobre account_payment_extension: Zikzakmedia S.L. 2009 | 20 | # Rehecho de nuevo para instalación OpenERP 5.0.0 sobre account_payment_extension: Zikzakmedia S.L. 2009 |
1743 | 21 | # Jordi Esteve <jesteve@zikzakmedia.com> | 21 | # Jordi Esteve <jesteve@zikzakmedia.com> |
1744 | 22 | # | 22 | # |
1745 | 23 | # Refactorización. Acysos S.L. (http://www.acysos.com) 2012 | ||
1746 | 24 | # Ignacio Ibeas <ignacio@acysos.com> | ||
1747 | 25 | # | ||
1748 | 23 | # This program is free software: you can redistribute it and/or modify | 26 | # This program is free software: you can redistribute it and/or modify |
1749 | 24 | # it under the terms of the GNU Affero General Public License as published by | 27 | # it under the terms of the GNU Affero General Public License as published by |
1750 | 25 | # the Free Software Foundation, either version 3 of the License, or | 28 | # the Free Software Foundation, either version 3 of the License, or |
1751 | @@ -35,21 +38,17 @@ | |||
1752 | 35 | # | 38 | # |
1753 | 36 | ############################################################################## | 39 | ############################################################################## |
1754 | 37 | 40 | ||
1755 | 41 | from osv import osv, fields | ||
1756 | 38 | from datetime import datetime | 42 | from datetime import datetime |
1757 | 39 | from tools.translate import _ | 43 | from tools.translate import _ |
1759 | 40 | from converter import * | 44 | from log import * |
1760 | 41 | import time | 45 | import time |
1761 | 42 | 46 | ||
1772 | 43 | csb34_code = { | 47 | class csb_34(osv.osv): |
1773 | 44 | 'transfer': '56', | 48 | _name = 'csb.34' |
1774 | 45 | 'cheques': '57', | 49 | _auto = False |
1775 | 46 | 'promissory_note': '58', | 50 | |
1776 | 47 | 'certified_payments': '59', | 51 | def get_message(self, cr, uid, recibo, message=None): |
1767 | 48 | } | ||
1768 | 49 | |||
1769 | 50 | class csb_34: | ||
1770 | 51 | |||
1771 | 52 | def get_message(self, recibo, message=None): | ||
1777 | 53 | """ | 52 | """ |
1778 | 54 | Evaluates an expression and returns its value | 53 | Evaluates an expression and returns its value |
1779 | 55 | @param recibo: Order line data | 54 | @param recibo: Order line data |
1780 | @@ -78,17 +77,19 @@ | |||
1781 | 78 | message = message.replace('${' + field + '}', value) | 77 | message = message.replace('${' + field + '}', value) |
1782 | 79 | return message | 78 | return message |
1783 | 80 | 79 | ||
1786 | 81 | def _start_34(self, cr, context): | 80 | def _start_34(self, cr, uid, context): |
1787 | 82 | return convert(cr, self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo, 12, context) | 81 | converter = self.pool.get('payment.converter.spain') |
1788 | 82 | return converter.convert(cr, uid, self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo, 12, context) | ||
1789 | 83 | 83 | ||
1790 | 84 | def _cabecera_ordenante_34(self, cr, uid, context): | 84 | def _cabecera_ordenante_34(self, cr, uid, context): |
1791 | 85 | converter = self.pool.get('payment.converter.spain') | ||
1792 | 85 | today = datetime.today().strftime('%d%m%y') | 86 | today = datetime.today().strftime('%d%m%y') |
1793 | 86 | 87 | ||
1794 | 87 | text = '' | 88 | text = '' |
1795 | 88 | 89 | ||
1796 | 89 | # Primer tipo | 90 | # Primer tipo |
1797 | 90 | text += '0362' | 91 | text += '0362' |
1799 | 91 | text += self._start_34(cr, context) | 92 | text += self._start_34(cr, uid, context) |
1800 | 92 | text += 12*' ' | 93 | text += 12*' ' |
1801 | 93 | text += '001' | 94 | text += '001' |
1802 | 94 | text += today | 95 | text += today |
1803 | @@ -97,24 +98,23 @@ | |||
1804 | 97 | text += planned.strftime('%d%m%y') | 98 | text += planned.strftime('%d%m%y') |
1805 | 98 | else: | 99 | else: |
1806 | 99 | text += today | 100 | text += today |
1809 | 100 | #text += self.convert(self.order.mode.nombre, 40) | 101 | text += converter.convert_bank_account(cr, uid, self.order.mode.bank_id.acc_number, self.order.mode.partner_id.name, context) |
1808 | 101 | text += convert_bank_account(cr, self.order.mode.bank_id.acc_number, self.order.mode.partner_id.name, context) | ||
1810 | 102 | text += '0' | 102 | text += '0' |
1811 | 103 | text += 8*' ' | 103 | text += 8*' ' |
1812 | 104 | text += '\r\n' | 104 | text += '\r\n' |
1813 | 105 | 105 | ||
1814 | 106 | # Segundo Tipo | 106 | # Segundo Tipo |
1815 | 107 | text += '0362' | 107 | text += '0362' |
1817 | 108 | text += self._start_34(cr, context) | 108 | text += self._start_34(cr, uid, context) |
1818 | 109 | text += 12*' ' | 109 | text += 12*' ' |
1819 | 110 | text += '002' | 110 | text += '002' |
1821 | 111 | text += convert(cr, self.order.mode.bank_id.partner_id.name, 36, context) | 111 | text += converter.convert(cr, uid, self.order.mode.bank_id.partner_id.name, 36, context) |
1822 | 112 | text += 5*' ' | 112 | text += 5*' ' |
1823 | 113 | text += '\r\n' | 113 | text += '\r\n' |
1824 | 114 | 114 | ||
1825 | 115 | # Tercer Tipo | 115 | # Tercer Tipo |
1826 | 116 | text += '0362' | 116 | text += '0362' |
1828 | 117 | text += self._start_34(cr, context) | 117 | text += self._start_34(cr, uid, context) |
1829 | 118 | text += 12*' ' | 118 | text += 12*' ' |
1830 | 119 | text += '003' | 119 | text += '003' |
1831 | 120 | # Direccion | 120 | # Direccion |
1832 | @@ -126,17 +126,17 @@ | |||
1833 | 126 | address = self.pool.get('res.partner.address').read(cr, uid, [address_ids.get('default')], ['street','zip','city'], context)[0] | 126 | address = self.pool.get('res.partner.address').read(cr, uid, [address_ids.get('default')], ['street','zip','city'], context)[0] |
1834 | 127 | else: | 127 | else: |
1835 | 128 | raise Log( _('User error:\n\nCompany %s has no invoicing or default address.') % self.order.mode.bank_id.partner_id.name ) | 128 | raise Log( _('User error:\n\nCompany %s has no invoicing or default address.') % self.order.mode.bank_id.partner_id.name ) |
1837 | 129 | text += convert(cr, address['street'], 36, context) | 129 | text += converter.convert(cr, uid, address['street'], 36, context) |
1838 | 130 | text += 5*' ' | 130 | text += 5*' ' |
1839 | 131 | text += '\r\n' | 131 | text += '\r\n' |
1840 | 132 | 132 | ||
1841 | 133 | # Cuarto Tipo | 133 | # Cuarto Tipo |
1842 | 134 | text += '0362' | 134 | text += '0362' |
1844 | 135 | text += self._start_34(cr, context) | 135 | text += self._start_34(cr, uid, context) |
1845 | 136 | text += 12*' ' | 136 | text += 12*' ' |
1846 | 137 | text += '004' | 137 | text += '004' |
1849 | 138 | text += convert(cr, address['zip'], 6, context) | 138 | text += converter.convert(cr, uid, address['zip'], 6, context) |
1850 | 139 | text += convert(cr, address['city'], 30, context) | 139 | text += converter.convert(cr, uid, address['city'], 30, context) |
1851 | 140 | text += 5*' ' | 140 | text += 5*' ' |
1852 | 141 | text += '\r\n' | 141 | text += '\r\n' |
1853 | 142 | if len(text)%74 != 0: | 142 | if len(text)%74 != 0: |
1854 | @@ -145,7 +145,7 @@ | |||
1855 | 145 | 145 | ||
1856 | 146 | def _cabecera_nacionales_34(self, cr, uid, context): | 146 | def _cabecera_nacionales_34(self, cr, uid, context): |
1857 | 147 | text = '0456' | 147 | text = '0456' |
1859 | 148 | text += self._start_34(cr, context) | 148 | text += self._start_34(cr, uid, context) |
1860 | 149 | text += 12*' ' | 149 | text += 12*' ' |
1861 | 150 | text += 3*' ' | 150 | text += 3*' ' |
1862 | 151 | text += 41*' ' | 151 | text += 41*' ' |
1863 | @@ -155,7 +155,13 @@ | |||
1864 | 155 | return text | 155 | return text |
1865 | 156 | 156 | ||
1866 | 157 | def _detalle_nacionales_34(self, cr, uid, recibo, csb34_type, context): | 157 | def _detalle_nacionales_34(self, cr, uid, recibo, csb34_type, context): |
1868 | 158 | 158 | converter = self.pool.get('payment.converter.spain') | |
1869 | 159 | csb34_code = { | ||
1870 | 160 | 'transfer': '56', | ||
1871 | 161 | 'cheques': '57', | ||
1872 | 162 | 'promissory_note': '58', | ||
1873 | 163 | 'certified_payments': '59', | ||
1874 | 164 | } | ||
1875 | 159 | address = None | 165 | address = None |
1876 | 160 | address_ids = self.pool.get('res.partner').address_get(cr, uid, [recibo['partner_id'].id], ['invoice', 'default']) | 166 | address_ids = self.pool.get('res.partner').address_get(cr, uid, [recibo['partner_id'].id], ['invoice', 'default']) |
1877 | 161 | if address_ids.get('invoice'): | 167 | if address_ids.get('invoice'): |
1878 | @@ -169,17 +175,16 @@ | |||
1879 | 169 | text = '' | 175 | text = '' |
1880 | 170 | text += '06' | 176 | text += '06' |
1881 | 171 | text += csb34_code[csb34_type] | 177 | text += csb34_code[csb34_type] |
1884 | 172 | text += self._start_34(cr, context) | 178 | text += self._start_34(cr, uid, context) |
1885 | 173 | text += convert(cr, recibo['partner_id'].vat, 12, context) | 179 | text += converter.convert(cr, uid, recibo['partner_id'].vat, 12, context) |
1886 | 174 | text += '010' | 180 | text += '010' |
1889 | 175 | text += convert(cr, abs(recibo['amount']), 12, context) | 181 | text += converter.convert(cr, uid, abs(recibo['amount']), 12, context) |
1888 | 176 | #text += convert_bank_account(cr, recibo['bank_id'].acc_number, recibo['partner_id'].name, context) | ||
1890 | 177 | 182 | ||
1891 | 178 | # Si la orden se emite para transferencia | 183 | # Si la orden se emite para transferencia |
1892 | 179 | csb34_type = self.order.mode.csb34_type | 184 | csb34_type = self.order.mode.csb34_type |
1893 | 180 | if csb34_type == 'transfer': | 185 | if csb34_type == 'transfer': |
1894 | 181 | ccc = recibo['bank_id'] and recibo['bank_id'].acc_number or '' | 186 | ccc = recibo['bank_id'] and recibo['bank_id'].acc_number or '' |
1896 | 182 | ccc = digits_only(ccc) | 187 | ccc = converter.digits_only(cr, uid, ccc) |
1897 | 183 | text += ccc[:20].zfill(20) | 188 | text += ccc[:20].zfill(20) |
1898 | 184 | # Si la orden se emite para pagaré, cheque o pago certificado | 189 | # Si la orden se emite para pagaré, cheque o pago certificado |
1899 | 185 | else: | 190 | else: |
1900 | @@ -220,10 +225,10 @@ | |||
1901 | 220 | # Segundo Registro | 225 | # Segundo Registro |
1902 | 221 | text += '06' | 226 | text += '06' |
1903 | 222 | text += csb34_code[csb34_type] | 227 | text += csb34_code[csb34_type] |
1906 | 223 | text += self._start_34(cr, context) | 228 | text += self._start_34(cr, uid, context) |
1907 | 224 | text += convert(cr, recibo['partner_id'].vat, 12, context) | 229 | text += converter.convert(cr, uid, recibo['partner_id'].vat, 12, context) |
1908 | 225 | text += '011' | 230 | text += '011' |
1910 | 226 | text += convert(cr, recibo['partner_id'].name, 36, context) | 231 | text += converter.convert(cr, uid, recibo['partner_id'].name, 36, context) |
1911 | 227 | text += 5*' ' | 232 | text += 5*' ' |
1912 | 228 | text += '\r\n' | 233 | text += '\r\n' |
1913 | 229 | 234 | ||
1914 | @@ -236,10 +241,10 @@ | |||
1915 | 236 | for (code, street) in lines: | 241 | for (code, street) in lines: |
1916 | 237 | text += '06' | 242 | text += '06' |
1917 | 238 | text += csb34_code[csb34_type] | 243 | text += csb34_code[csb34_type] |
1920 | 239 | text += self._start_34(cr, context) | 244 | text += self._start_34(cr, uid, context) |
1921 | 240 | text += convert(cr, recibo['partner_id'].vat, 12, context) | 245 | text += converter.convert(cr, uid, recibo['partner_id'].vat, 12, context) |
1922 | 241 | text += code | 246 | text += code |
1924 | 242 | text += convert(cr, street, 36, context) | 247 | text += converter.convert(cr, uid, street, 36, context) |
1925 | 243 | text += 5*' ' | 248 | text += 5*' ' |
1926 | 244 | text += '\r\n' | 249 | text += '\r\n' |
1927 | 245 | 250 | ||
1928 | @@ -247,11 +252,11 @@ | |||
1929 | 247 | if address.zip or address.city: | 252 | if address.zip or address.city: |
1930 | 248 | text += '06' | 253 | text += '06' |
1931 | 249 | text += csb34_code[csb34_type] | 254 | text += csb34_code[csb34_type] |
1934 | 250 | text += self._start_34(cr, context) | 255 | text += self._start_34(cr, uid, context) |
1935 | 251 | text += convert(cr, recibo['partner_id'].vat, 12, context) | 256 | text += converter.convert(cr, uid, recibo['partner_id'].vat, 12, context) |
1936 | 252 | text += '014' | 257 | text += '014' |
1939 | 253 | text += convert(cr, address.zip, 6, context) | 258 | text += converter.convert(cr, uid, address.zip, 6, context) |
1940 | 254 | text += convert(cr, address.city, 30, context) | 259 | text += converter.convert(cr, uid, address.city, 30, context) |
1941 | 255 | text += 5*' ' | 260 | text += 5*' ' |
1942 | 256 | text += '\r\n' | 261 | text += '\r\n' |
1943 | 257 | 262 | ||
1944 | @@ -262,13 +267,13 @@ | |||
1945 | 262 | # Sexto Registro | 267 | # Sexto Registro |
1946 | 263 | text += '06' | 268 | text += '06' |
1947 | 264 | text += csb34_code[csb34_type] | 269 | text += csb34_code[csb34_type] |
1950 | 265 | text += self._start_34(cr, context) | 270 | text += self._start_34(cr, uid, context) |
1951 | 266 | text += convert(cr, recibo['partner_id'].vat, 12, context) | 271 | text += converter.convert(cr, uid, recibo['partner_id'].vat, 12, context) |
1952 | 267 | text += '015' | 272 | text += '015' |
1953 | 268 | country_code = address.country_id and address.country_id.code or '' | 273 | country_code = address.country_id and address.country_id.code or '' |
1954 | 269 | state = address.state_id and address.state_id.name or '' | 274 | state = address.state_id and address.state_id.name or '' |
1957 | 270 | text += convert(cr, country_code, 2, context) | 275 | text += converter.convert(cr, uid, country_code, 2, context) |
1958 | 271 | text += convert(cr, state, 34, context) | 276 | text += converter.convert(cr, uid, state, 34, context) |
1959 | 272 | text += 5*' ' | 277 | text += 5*' ' |
1960 | 273 | text += '\r\n' | 278 | text += '\r\n' |
1961 | 274 | 279 | ||
1962 | @@ -278,43 +283,43 @@ | |||
1963 | 278 | if self.order.mode.payroll_check: | 283 | if self.order.mode.payroll_check: |
1964 | 279 | text += '06' | 284 | text += '06' |
1965 | 280 | text += csb34_code[csb34_type] | 285 | text += csb34_code[csb34_type] |
1968 | 281 | text += self._start_34(cr, context) | 286 | text += self._start_34(cr, uid, context) |
1969 | 282 | text += convert(cr, recibo['partner_id'].vat, 12, context) | 287 | text += converter.convert(cr, uid, recibo['partner_id'].vat, 12, context) |
1970 | 283 | text += '018' | 288 | text += '018' |
1972 | 284 | text += convert(cr, recibo['partner_id'].vat, 36, context) | 289 | text += converter.convert(cr, uid, recibo['partner_id'].vat, 36, context) |
1973 | 285 | text += 5*' ' | 290 | text += 5*' ' |
1974 | 286 | text += '\r\n' | 291 | text += '\r\n' |
1975 | 287 | 292 | ||
1976 | 288 | # Registro ciento uno (registro usados por algunos bancos como texto de la carta) | 293 | # Registro ciento uno (registro usados por algunos bancos como texto de la carta) |
1977 | 289 | text += '06' | 294 | text += '06' |
1978 | 290 | text += csb34_code[csb34_type] | 295 | text += csb34_code[csb34_type] |
1981 | 291 | text += self._start_34(cr, context) | 296 | text += self._start_34(cr, uid, context) |
1982 | 292 | text += convert(cr, recibo['partner_id'].vat, 12, context) | 297 | text += converter.convert(cr, uid, recibo['partner_id'].vat, 12, context) |
1983 | 293 | text += '101' | 298 | text += '101' |
1986 | 294 | message = self.get_message(recibo, self.order.mode.text1) | 299 | message = self.get_message(cr, uid, recibo, self.order.mode.text1) |
1987 | 295 | text += convert(cr, message, 36, context) | 300 | text += converter.convert(cr, uid, message, 36, context) |
1988 | 296 | text += 5*' ' | 301 | text += 5*' ' |
1989 | 297 | text += '\r\n' | 302 | text += '\r\n' |
1990 | 298 | 303 | ||
1991 | 299 | # Registro ciento dos (registro usados por algunos bancos como texto de la carta) | 304 | # Registro ciento dos (registro usados por algunos bancos como texto de la carta) |
1992 | 300 | text += '06' | 305 | text += '06' |
1993 | 301 | text += csb34_code[csb34_type] | 306 | text += csb34_code[csb34_type] |
1996 | 302 | text += self._start_34(cr, context) | 307 | text += self._start_34(cr, uid, context) |
1997 | 303 | text += convert(cr, recibo['partner_id'].vat, 12, context) | 308 | text += converter.convert(cr, uid, recibo['partner_id'].vat, 12, context) |
1998 | 304 | text += '102' | 309 | text += '102' |
2001 | 305 | message = self.get_message(recibo, self.order.mode.text2) | 310 | message = self.get_message(cr, uid, recibo, self.order.mode.text2) |
2002 | 306 | text += convert(cr, message, 36, context) | 311 | text += converter.convert(cr, uid, message, 36, context) |
2003 | 307 | text += 5*' ' | 312 | text += 5*' ' |
2004 | 308 | text += '\r\n' | 313 | text += '\r\n' |
2005 | 309 | 314 | ||
2006 | 310 | # Registro ciento tres (registro usados por algunos bancos como texto de la carta) | 315 | # Registro ciento tres (registro usados por algunos bancos como texto de la carta) |
2007 | 311 | text += '06' | 316 | text += '06' |
2008 | 312 | text += csb34_code[csb34_type] | 317 | text += csb34_code[csb34_type] |
2011 | 313 | text += self._start_34(cr, context) | 318 | text += self._start_34(cr, uid, context) |
2012 | 314 | text += convert(cr, recibo['partner_id'].vat, 12, context) | 319 | text += converter.convert(cr, uid, recibo['partner_id'].vat, 12, context) |
2013 | 315 | text += '103' | 320 | text += '103' |
2016 | 316 | message = self.get_message(recibo, self.order.mode.text3) | 321 | message = self.get_message(cr, uid, recibo, self.order.mode.text3) |
2017 | 317 | text += convert(cr, message, 36, context) | 322 | text += converter.convert(cr, uid, message, 36, context) |
2018 | 318 | text += 5*' ' | 323 | text += 5*' ' |
2019 | 319 | text += '\r\n' | 324 | text += '\r\n' |
2020 | 320 | 325 | ||
2021 | @@ -330,10 +335,10 @@ | |||
2022 | 330 | message = day+month+year | 335 | message = day+month+year |
2023 | 331 | text += '06' | 336 | text += '06' |
2024 | 332 | text += csb34_code[csb34_type] | 337 | text += csb34_code[csb34_type] |
2027 | 333 | text += self._start_34(cr, context) | 338 | text += self._start_34(cr, uid, context) |
2028 | 334 | text += convert(cr, recibo['partner_id'].vat, 12, context) | 339 | text += converter.convert(cr, uid, recibo['partner_id'].vat, 12, context) |
2029 | 335 | text += '910' | 340 | text += '910' |
2031 | 336 | text += convert(cr, message, 36, context) | 341 | text += converter.convert(cr, uid, message, 36, context) |
2032 | 337 | text += 5*' ' | 342 | text += 5*' ' |
2033 | 338 | text += '\r\n' | 343 | text += '\r\n' |
2034 | 339 | 344 | ||
2035 | @@ -342,13 +347,14 @@ | |||
2036 | 342 | return text | 347 | return text |
2037 | 343 | 348 | ||
2038 | 344 | def _totales_nacionales_34(self, cr, uid, values, context): | 349 | def _totales_nacionales_34(self, cr, uid, values, context): |
2039 | 350 | converter = self.pool.get('payment.converter.spain') | ||
2040 | 345 | text = '0856' | 351 | text = '0856' |
2042 | 346 | text += self._start_34(cr, context) | 352 | text += self._start_34(cr, uid, context) |
2043 | 347 | text += 12*' ' | 353 | text += 12*' ' |
2044 | 348 | text += 3*' ' | 354 | text += 3*' ' |
2048 | 349 | text += convert(cr, self.order.total, 12, context) | 355 | text += converter.convert(cr, uid, self.order.total, 12, context) |
2049 | 350 | text += convert(cr, values[0], 8, context) | 356 | text += converter.convert(cr, uid, values[0], 8, context) |
2050 | 351 | text += convert(cr, values[1], 10, context) | 357 | text += converter.convert(cr, uid, values[1], 10, context) |
2051 | 352 | text += 6*' ' | 358 | text += 6*' ' |
2052 | 353 | text += 5*' ' | 359 | text += 5*' ' |
2053 | 354 | text += '\r\n' | 360 | text += '\r\n' |
2054 | @@ -357,13 +363,14 @@ | |||
2055 | 357 | return text | 363 | return text |
2056 | 358 | 364 | ||
2057 | 359 | def _total_general_34(self, cr, uid, values, context): | 365 | def _total_general_34(self, cr, uid, values, context): |
2058 | 366 | converter = self.pool.get('payment.converter.spain') | ||
2059 | 360 | text = '0962' | 367 | text = '0962' |
2061 | 361 | text += self._start_34(cr, context) | 368 | text += self._start_34(cr, uid, context) |
2062 | 362 | text += 12*' ' | 369 | text += 12*' ' |
2063 | 363 | text += 3*' ' | 370 | text += 3*' ' |
2067 | 364 | text += convert(cr, self.order.total, 12, context) | 371 | text += converter.convert(cr, uid, self.order.total, 12, context) |
2068 | 365 | text += convert(cr, values[0], 8, context) | 372 | text += converter.convert(cr, uid, values[0], 8, context) |
2069 | 366 | text += convert(cr, values[1], 10, context) | 373 | text += converter.convert(cr, uid, values[1], 10, context) |
2070 | 367 | text += 6*' ' | 374 | text += 6*' ' |
2071 | 368 | text += 5*' ' | 375 | text += 5*' ' |
2072 | 369 | text += '\r\n' | 376 | text += '\r\n' |
2073 | @@ -371,10 +378,8 @@ | |||
2074 | 371 | raise Log(_('Configuration error:\n\nThe line "%s" is not 72 characters long:\n%s') % ('Total general 34', text), True) | 378 | raise Log(_('Configuration error:\n\nThe line "%s" is not 72 characters long:\n%s') % ('Total general 34', text), True) |
2075 | 372 | return text | 379 | return text |
2076 | 373 | 380 | ||
2079 | 374 | def create_file(self, pool, cr, uid, order, lines, context): | 381 | def create_file(self, cr, uid, order, lines, context): |
2078 | 375 | self.pool = pool | ||
2080 | 376 | self.order = order | 382 | self.order = order |
2081 | 377 | self.context = context | ||
2082 | 378 | 383 | ||
2083 | 379 | payment_line_count = 0 | 384 | payment_line_count = 0 |
2084 | 380 | record_count = 0 | 385 | record_count = 0 |
2085 | @@ -394,4 +399,4 @@ | |||
2086 | 394 | file += self._total_general_34(cr, uid, values, context) | 399 | file += self._total_general_34(cr, uid, values, context) |
2087 | 395 | return file | 400 | return file |
2088 | 396 | 401 | ||
2090 | 397 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | 402 | csb_34() |
2091 | 398 | 403 | ||
2092 | === modified file 'l10n_es_payment_order/wizard/csb_34_01.py' | |||
2093 | --- l10n_es_payment_order/wizard/csb_34_01.py 2012-05-28 19:13:52 +0000 | |||
2094 | +++ l10n_es_payment_order/wizard/csb_34_01.py 2013-01-11 10:23:22 +0000 | |||
2095 | @@ -23,6 +23,9 @@ | |||
2096 | 23 | # Adaptacion de la norma 34-01 para emision de pagos. Validado para La Caixa: 2012 | 23 | # Adaptacion de la norma 34-01 para emision de pagos. Validado para La Caixa: 2012 |
2097 | 24 | # Joan M. Grande <totaler@gmail.com> | 24 | # Joan M. Grande <totaler@gmail.com> |
2098 | 25 | # | 25 | # |
2099 | 26 | # Refactorización. Acysos S.L. (http://www.acysos.com) 2012 | ||
2100 | 27 | # Ignacio Ibeas <ignacio@acysos.com> | ||
2101 | 28 | # | ||
2102 | 26 | # This program is free software: you can redistribute it and/or modify | 29 | # This program is free software: you can redistribute it and/or modify |
2103 | 27 | # it under the terms of the GNU Affero General Public License as published by | 30 | # it under the terms of the GNU Affero General Public License as published by |
2104 | 28 | # the Free Software Foundation, either version 3 of the License, or | 31 | # the Free Software Foundation, either version 3 of the License, or |
2105 | @@ -38,22 +41,28 @@ | |||
2106 | 38 | # | 41 | # |
2107 | 39 | ############################################################################## | 42 | ############################################################################## |
2108 | 40 | 43 | ||
2109 | 44 | from osv import osv, fields | ||
2110 | 41 | from datetime import datetime | 45 | from datetime import datetime |
2111 | 42 | from tools.translate import _ | 46 | from tools.translate import _ |
2113 | 43 | from converter import * | 47 | from log import * |
2114 | 44 | 48 | ||
2118 | 45 | class csb_34_01: | 49 | class csb_34_01(osv.osv): |
2119 | 46 | def _start_34(self, cr, context): | 50 | _name = 'csb.3401' |
2120 | 47 | return convert(cr, self.order.mode.bank_id.partner_id.vat[2:], 10, context, 'right') | 51 | _auto = False |
2121 | 52 | |||
2122 | 53 | def _start_34(self, cr, uid, context): | ||
2123 | 54 | converter = self.pool.get('payment.converter.spain') | ||
2124 | 55 | return converter.convert(cr, uid, self.order.mode.bank_id.partner_id.vat[2:], 10, context, 'right') | ||
2125 | 48 | 56 | ||
2126 | 49 | def _cabecera_ordenante_34(self, cr, uid, context): | 57 | def _cabecera_ordenante_34(self, cr, uid, context): |
2127 | 58 | converter = self.pool.get('payment.converter.spain') | ||
2128 | 50 | today = datetime.today().strftime('%d%m%y') | 59 | today = datetime.today().strftime('%d%m%y') |
2129 | 51 | 60 | ||
2130 | 52 | text = '' | 61 | text = '' |
2131 | 53 | 62 | ||
2132 | 54 | # Primer tipo | 63 | # Primer tipo |
2133 | 55 | text += '0356' | 64 | text += '0356' |
2135 | 56 | text += self._start_34(cr, context) | 65 | text += self._start_34(cr, uid, context) |
2136 | 57 | text += '34016' | 66 | text += '34016' |
2137 | 58 | text += 7*' ' | 67 | text += 7*' ' |
2138 | 59 | text += '001' | 68 | text += '001' |
2139 | @@ -64,7 +73,7 @@ | |||
2140 | 64 | else: | 73 | else: |
2141 | 65 | text += today | 74 | text += today |
2142 | 66 | #text += self.convert(self.order.mode.nombre, 40) | 75 | #text += self.convert(self.order.mode.nombre, 40) |
2144 | 67 | ccc = bank_account_parts(cr, self.order.mode.bank_id.acc_number, self.order.mode.partner_id.name, context) | 76 | ccc = converter.bank_account_parts(cr, uid, self.order.mode.bank_id.acc_number, self.order.mode.partner_id.name, context) |
2145 | 68 | text += ccc['bank'] | 77 | text += ccc['bank'] |
2146 | 69 | text += ccc['office'] | 78 | text += ccc['office'] |
2147 | 70 | text += ccc['account'] | 79 | text += ccc['account'] |
2148 | @@ -77,17 +86,17 @@ | |||
2149 | 77 | 86 | ||
2150 | 78 | # Segundo Tipo | 87 | # Segundo Tipo |
2151 | 79 | text += '0356' | 88 | text += '0356' |
2153 | 80 | text += self._start_34(cr, context) | 89 | text += self._start_34(cr, uid, context) |
2154 | 81 | text += '34016' | 90 | text += '34016' |
2155 | 82 | text += 7*' ' | 91 | text += 7*' ' |
2156 | 83 | text += '002' | 92 | text += '002' |
2158 | 84 | text += convert(cr, self.order.mode.bank_id.partner_id.name, 36, context) | 93 | text += converter.convert(cr, uid, self.order.mode.bank_id.partner_id.name, 36, context) |
2159 | 85 | text += 7*' ' | 94 | text += 7*' ' |
2160 | 86 | text += '\n' | 95 | text += '\n' |
2161 | 87 | 96 | ||
2162 | 88 | # Tercer Tipo | 97 | # Tercer Tipo |
2163 | 89 | text += '0356' | 98 | text += '0356' |
2165 | 90 | text += self._start_34(cr, context) | 99 | text += self._start_34(cr, uid, context) |
2166 | 91 | text += '34016' | 100 | text += '34016' |
2167 | 92 | text += 7*' ' | 101 | text += 7*' ' |
2168 | 93 | text += '003' | 102 | text += '003' |
2169 | @@ -97,35 +106,34 @@ | |||
2170 | 97 | raise Log( _('User error:\n\nCompany %s has no invoicing address.') % address_id ) | 106 | raise Log( _('User error:\n\nCompany %s has no invoicing address.') % address_id ) |
2171 | 98 | 107 | ||
2172 | 99 | street = self.pool.get('res.partner.address').read(cr, uid, [address_id], ['street'], context)[0]['street'] | 108 | street = self.pool.get('res.partner.address').read(cr, uid, [address_id], ['street'], context)[0]['street'] |
2174 | 100 | text += convert(cr, street, 36, context) | 109 | text += converter.convert(cr, uid, street, 36, context) |
2175 | 101 | text += 7*' ' | 110 | text += 7*' ' |
2176 | 102 | text += '\n' | 111 | text += '\n' |
2177 | 103 | 112 | ||
2178 | 104 | # Cuarto Tipo | 113 | # Cuarto Tipo |
2179 | 105 | text += '0356' | 114 | text += '0356' |
2181 | 106 | text += self._start_34(cr, context) | 115 | text += self._start_34(cr, uid, context) |
2182 | 107 | text += '34016' | 116 | text += '34016' |
2183 | 108 | text += 7*' ' | 117 | text += 7*' ' |
2184 | 109 | text += '004' | 118 | text += '004' |
2185 | 110 | city = self.pool.get('res.partner.address').read(cr, uid, [address_id], ['city'], context)[0]['city'] | 119 | city = self.pool.get('res.partner.address').read(cr, uid, [address_id], ['city'], context)[0]['city'] |
2187 | 111 | text += convert(cr, city, 36, context) | 120 | text += converter.convert(cr, uid, city, 36, context) |
2188 | 112 | text += 7*' ' | 121 | text += 7*' ' |
2189 | 113 | text += '\n' | 122 | text += '\n' |
2190 | 114 | return text | 123 | return text |
2191 | 115 | 124 | ||
2192 | 116 | def _detalle_nacionales_34(self, cr, uid, recibo, context): | 125 | def _detalle_nacionales_34(self, cr, uid, recibo, context): |
2193 | 126 | converter = self.pool.get('payment.converter.spain') | ||
2194 | 117 | # Primer Registro | 127 | # Primer Registro |
2195 | 118 | text = '' | 128 | text = '' |
2196 | 119 | text += '0656' | 129 | text += '0656' |
2198 | 120 | text += self._start_34(cr, context) | 130 | text += self._start_34(cr, uid, context) |
2199 | 121 | if not recibo['partner_id'].vat: | 131 | if not recibo['partner_id'].vat: |
2200 | 122 | raise Log( _('User error:\n\nCompany %s has no vat.') % recibo['partner_id'].name ) | 132 | raise Log( _('User error:\n\nCompany %s has no vat.') % recibo['partner_id'].name ) |
2202 | 123 | text += convert(cr, recibo['partner_id'].vat[2:], 12, context, 'right') | 133 | text += converter.convert(cr, uid, recibo['partner_id'].vat[2:], 12, context, 'right') |
2203 | 124 | text += '010' | 134 | text += '010' |
2208 | 125 | text += convert(cr, recibo['amount'], 12, context) | 135 | text += converter.convert(cr, uid, recibo['amount'], 12, context) |
2209 | 126 | #text += convert_bank_account(cr, recibo['bank_id'].acc_number, recibo['partner_id'].name, context) | 136 | ccc = converter.bank_account_parts(cr, uid, recibo['bank_id'].acc_number, recibo['partner_id'].name, context) |
2206 | 127 | #ccc = recibo['bank_id'] and recibo['bank_id'].acc_number or '' | ||
2207 | 128 | ccc = bank_account_parts(cr, recibo['bank_id'].acc_number, recibo['partner_id'].name, context) | ||
2210 | 129 | text += ccc['bank'] | 137 | text += ccc['bank'] |
2211 | 130 | text += ccc['office'] | 138 | text += ccc['office'] |
2212 | 131 | text += ccc['account'] | 139 | text += ccc['account'] |
2213 | @@ -138,33 +146,32 @@ | |||
2214 | 138 | 146 | ||
2215 | 139 | # Segundo Registro | 147 | # Segundo Registro |
2216 | 140 | text += '0656' | 148 | text += '0656' |
2218 | 141 | text += self._start_34(cr, context) | 149 | text += self._start_34(cr, uid, context) |
2219 | 142 | if not recibo['partner_id'].vat: | 150 | if not recibo['partner_id'].vat: |
2220 | 143 | raise Log( _('User error:\n\nCompany %s has no vat.') % recibo['partner_id'].name ) | 151 | raise Log( _('User error:\n\nCompany %s has no vat.') % recibo['partner_id'].name ) |
2222 | 144 | text += convert(cr, recibo['partner_id'].vat[2:], 12, context, 'right') | 152 | text += converter.convert(cr, uid, recibo['partner_id'].vat[2:], 12, context, 'right') |
2223 | 145 | text += '011' | 153 | text += '011' |
2225 | 146 | text += convert(cr, recibo['partner_id'].name, 36, context) | 154 | text += converter.convert(cr, uid, recibo['partner_id'].name, 36, context) |
2226 | 147 | text += 7*' ' | 155 | text += 7*' ' |
2227 | 148 | text += '\n' | 156 | text += '\n' |
2228 | 149 | return text | 157 | return text |
2229 | 150 | 158 | ||
2230 | 151 | def _totales_nacionales_34(self, cr, uid, context): | 159 | def _totales_nacionales_34(self, cr, uid, context): |
2231 | 160 | converter = self.pool.get('payment.converter.spain') | ||
2232 | 152 | text = '0856' | 161 | text = '0856' |
2234 | 153 | text += self._start_34(cr, context) | 162 | text += self._start_34(cr, uid, context) |
2235 | 154 | text += 12*' ' | 163 | text += 12*' ' |
2236 | 155 | text += 3*' ' | 164 | text += 3*' ' |
2240 | 156 | text += convert(cr, self.order.total, 12, context) | 165 | text += converter.convert(cr, uid, self.order.total, 12, context) |
2241 | 157 | text += convert(cr, self.payment_line_count, 8, context) | 166 | text += converter.convert(cr, uid, self.payment_line_count, 8, context) |
2242 | 158 | text += convert(cr, self.record_count, 10, context) | 167 | text += converter.convert(cr, uid, self.record_count, 10, context) |
2243 | 159 | text += 6*' ' | 168 | text += 6*' ' |
2244 | 160 | text += 7*' ' | 169 | text += 7*' ' |
2245 | 161 | text += '\n' | 170 | text += '\n' |
2246 | 162 | return text | 171 | return text |
2247 | 163 | 172 | ||
2250 | 164 | def create_file(self, pool, cr, uid, order, lines, context): | 173 | def create_file(self, cr, uid, order, lines, context): |
2249 | 165 | self.pool = pool | ||
2251 | 166 | self.order = order | 174 | self.order = order |
2252 | 167 | self.context = context | ||
2253 | 168 | 175 | ||
2254 | 169 | self.payment_line_count = 0 | 176 | self.payment_line_count = 0 |
2255 | 170 | self.record_count = 0 | 177 | self.record_count = 0 |
2256 | @@ -181,4 +188,4 @@ | |||
2257 | 181 | 188 | ||
2258 | 182 | return file | 189 | return file |
2259 | 183 | 190 | ||
2261 | 184 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | 191 | csb_34_01() |
2262 | 185 | 192 | ||
2263 | === modified file 'l10n_es_payment_order/wizard/csb_58.py' | |||
2264 | --- l10n_es_payment_order/wizard/csb_58.py 2011-08-29 15:11:11 +0000 | |||
2265 | +++ l10n_es_payment_order/wizard/csb_58.py 2013-01-11 10:23:22 +0000 | |||
2266 | @@ -18,6 +18,9 @@ | |||
2267 | 18 | # Rehecho de nuevo para instalación OpenERP 5.0.0 sobre account_payment_extension: Zikzakmedia S.L. 2009 | 18 | # Rehecho de nuevo para instalación OpenERP 5.0.0 sobre account_payment_extension: Zikzakmedia S.L. 2009 |
2268 | 19 | # Jordi Esteve <jesteve@zikzakmedia.com> | 19 | # Jordi Esteve <jesteve@zikzakmedia.com> |
2269 | 20 | # | 20 | # |
2270 | 21 | # Refactorización. Acysos S.L. (http://www.acysos.com) 2012 | ||
2271 | 22 | # Ignacio Ibeas <ignacio@acysos.com> | ||
2272 | 23 | # | ||
2273 | 21 | # This program is free software: you can redistribute it and/or modify | 24 | # This program is free software: you can redistribute it and/or modify |
2274 | 22 | # it under the terms of the GNU Affero General Public License as published by | 25 | # it under the terms of the GNU Affero General Public License as published by |
2275 | 23 | # the Free Software Foundation, either version 3 of the License, or | 26 | # the Free Software Foundation, either version 3 of the License, or |
2276 | @@ -33,19 +36,24 @@ | |||
2277 | 33 | # | 36 | # |
2278 | 34 | ############################################################################## | 37 | ############################################################################## |
2279 | 35 | 38 | ||
2280 | 39 | from osv import osv, fields | ||
2281 | 36 | from datetime import datetime | 40 | from datetime import datetime |
2282 | 37 | from tools.translate import _ | 41 | from tools.translate import _ |
2284 | 38 | from converter import * | 42 | from log import * |
2285 | 39 | 43 | ||
2288 | 40 | class csb_58: | 44 | class csb_58(osv.osv): |
2289 | 41 | def _cabecera_presentador_58(self): | 45 | _name = 'csb.58' |
2290 | 46 | _auto = False | ||
2291 | 47 | |||
2292 | 48 | def _cabecera_presentador_58(self, cr, uid): | ||
2293 | 49 | converter = self.pool.get('payment.converter.spain') | ||
2294 | 42 | texto = '5170' | 50 | texto = '5170' |
2295 | 43 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) | 51 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) |
2296 | 44 | texto += datetime.today().strftime('%d%m%y') | 52 | texto += datetime.today().strftime('%d%m%y') |
2297 | 45 | texto += 6*' ' | 53 | texto += 6*' ' |
2299 | 46 | texto += to_ascii(self.order.mode.nombre).ljust(40) | 54 | texto += converter.to_ascii(cr, uid, self.order.mode.nombre).ljust(40) |
2300 | 47 | texto += 20*' ' | 55 | texto += 20*' ' |
2302 | 48 | cc = digits_only(self.order.mode.bank_id.acc_number) | 56 | cc = converter.digits_only(cr, uid, self.order.mode.bank_id.acc_number) |
2303 | 49 | texto += cc[0:8] | 57 | texto += cc[0:8] |
2304 | 50 | texto += 66*' ' | 58 | texto += 66*' ' |
2305 | 51 | texto += '\r\n' | 59 | texto += '\r\n' |
2306 | @@ -53,32 +61,34 @@ | |||
2307 | 53 | raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Cabecera presentador 58', texto), True) | 61 | raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Cabecera presentador 58', texto), True) |
2308 | 54 | return texto | 62 | return texto |
2309 | 55 | 63 | ||
2311 | 56 | def _cabecera_ordenante_58(self): | 64 | def _cabecera_ordenante_58(self, cr, uid): |
2312 | 65 | converter = self.pool.get('payment.converter.spain') | ||
2313 | 57 | texto = '5370' | 66 | texto = '5370' |
2314 | 58 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) | 67 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) |
2315 | 59 | texto += datetime.today().strftime('%d%m%y') | 68 | texto += datetime.today().strftime('%d%m%y') |
2316 | 60 | texto += 6*' ' | 69 | texto += 6*' ' |
2319 | 61 | texto += to_ascii(self.order.mode.nombre).ljust(40) | 70 | texto += converter.to_ascii(cr, uid, self.order.mode.nombre).ljust(40) |
2320 | 62 | cc = digits_only(self.order.mode.bank_id.acc_number) | 71 | cc = converter.digits_only(cr, uid, self.order.mode.bank_id.acc_number) |
2321 | 63 | texto += cc[0:20] | 72 | texto += cc[0:20] |
2322 | 64 | texto += 8*' ' | 73 | texto += 8*' ' |
2323 | 65 | texto += '06' | 74 | texto += '06' |
2324 | 66 | texto += 52*' ' | 75 | texto += 52*' ' |
2326 | 67 | texto += self.order.mode.ine and to_ascii(self.order.mode.ine)[:9].zfill(9) or 9*' ' | 76 | texto += self.order.mode.ine and converter.to_ascii(cr, uid, self.order.mode.ine)[:9].zfill(9) or 9*' ' |
2327 | 68 | texto += 3*' ' | 77 | texto += 3*' ' |
2328 | 69 | texto += '\r\n' | 78 | texto += '\r\n' |
2329 | 70 | if len(texto) != 164: | 79 | if len(texto) != 164: |
2330 | 71 | raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Cabecera ordenante 58', texto), True) | 80 | raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Cabecera ordenante 58', texto), True) |
2331 | 72 | return texto | 81 | return texto |
2332 | 73 | 82 | ||
2334 | 74 | def _individual_obligatorio_58(self, recibo): | 83 | def _individual_obligatorio_58(self, cr, uid, recibo): |
2335 | 84 | converter = self.pool.get('payment.converter.spain') | ||
2336 | 75 | texto = '5670' | 85 | texto = '5670' |
2337 | 76 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) | 86 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) |
2338 | 77 | texto += str(recibo['name'])[-12:].zfill(12) | 87 | texto += str(recibo['name'])[-12:].zfill(12) |
2340 | 78 | nombre = to_ascii(recibo['partner_id'].name) | 88 | nombre = converter.to_ascii(cr, uid, recibo['partner_id'].name) |
2341 | 79 | texto += nombre[0:40].ljust(40) | 89 | texto += nombre[0:40].ljust(40) |
2342 | 80 | ccc = recibo['bank_id'] and recibo['bank_id'].acc_number or '' | 90 | ccc = recibo['bank_id'] and recibo['bank_id'].acc_number or '' |
2344 | 81 | ccc = digits_only(ccc) | 91 | ccc = converter.digits_only(cr, uid, ccc) |
2345 | 82 | texto += str(ccc)[0:20].zfill(20) | 92 | texto += str(ccc)[0:20].zfill(20) |
2346 | 83 | importe = int(round(abs(recibo['amount'])*100,0)) | 93 | importe = int(round(abs(recibo['amount'])*100,0)) |
2347 | 84 | texto += str(importe).zfill(10) | 94 | texto += str(importe).zfill(10) |
2348 | @@ -86,7 +96,7 @@ | |||
2349 | 86 | concepto = '' | 96 | concepto = '' |
2350 | 87 | if recibo['communication']: | 97 | if recibo['communication']: |
2351 | 88 | concepto = recibo['communication'] | 98 | concepto = recibo['communication'] |
2353 | 89 | texto += to_ascii(concepto)[0:40].ljust(40) | 99 | texto += converter.to_ascii(cr, uid, concepto)[0:40].ljust(40) |
2354 | 90 | if recibo.get('date'): | 100 | if recibo.get('date'): |
2355 | 91 | date_cargo = datetime.strptime(recibo['date'],'%Y-%m-%d') | 101 | date_cargo = datetime.strptime(recibo['date'],'%Y-%m-%d') |
2356 | 92 | elif recibo.get('ml_maturity_date'): | 102 | elif recibo.get('ml_maturity_date'): |
2357 | @@ -100,19 +110,20 @@ | |||
2358 | 100 | raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Individual obligatorio 58', texto), True) | 110 | raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Individual obligatorio 58', texto), True) |
2359 | 101 | return texto | 111 | return texto |
2360 | 102 | 112 | ||
2362 | 103 | def _individual_opcional_58(self, recibo): | 113 | def _individual_opcional_58(self, cr, uid, recibo): |
2363 | 104 | """Para poner el segundo texto de comunicación""" | 114 | """Para poner el segundo texto de comunicación""" |
2364 | 115 | converter = self.pool.get('payment.converter.spain') | ||
2365 | 105 | texto = '5671' | 116 | texto = '5671' |
2366 | 106 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) | 117 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) |
2367 | 107 | texto += str(recibo['name'])[-12:].zfill(12) | 118 | texto += str(recibo['name'])[-12:].zfill(12) |
2369 | 108 | texto += to_ascii(recibo['communication2'])[0:134].ljust(134) | 119 | texto += converter.to_ascii(cr, uid, recibo['communication2'])[0:134].ljust(134) |
2370 | 109 | texto += '\r\n' | 120 | texto += '\r\n' |
2371 | 110 | if len(texto) != 164: | 121 | if len(texto) != 164: |
2372 | 111 | raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Individual opcional 58', texto), True) | 122 | raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Individual opcional 58', texto), True) |
2373 | 112 | return texto | 123 | return texto |
2374 | 113 | 124 | ||
2375 | 114 | 125 | ||
2377 | 115 | def _registro_obligatorio_domicilio_58(self, recibo): | 126 | def _registro_obligatorio_domicilio_58(self, cr, uid, recibo): |
2378 | 116 | """ | 127 | """ |
2379 | 117 | Registro obligatorio domicilio 58 para no domiciliados. | 128 | Registro obligatorio domicilio 58 para no domiciliados. |
2380 | 118 | 129 | ||
2381 | @@ -134,7 +145,7 @@ | |||
2382 | 134 | (DDMMAA) | 145 | (DDMMAA) |
2383 | 135 | F2 Libre 155 8 Alfanumérico | 146 | F2 Libre 155 8 Alfanumérico |
2384 | 136 | """ | 147 | """ |
2386 | 137 | 148 | converter = self.pool.get('payment.converter.spain') | |
2387 | 138 | alt_format = self.order.mode.alt_domicile_format | 149 | alt_format = self.order.mode.alt_domicile_format |
2388 | 139 | 150 | ||
2389 | 140 | # | 151 | # |
2390 | @@ -207,10 +218,10 @@ | |||
2391 | 207 | texto = '5676' | 218 | texto = '5676' |
2392 | 208 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) | 219 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) |
2393 | 209 | texto += str(recibo['name'])[-12:].zfill(12) | 220 | texto += str(recibo['name'])[-12:].zfill(12) |
2398 | 210 | texto += to_ascii(st)[:40].ljust(40) # Domicilio | 221 | texto += converter.to_ascii(cr, uid, st)[:40].ljust(40) # Domicilio |
2399 | 211 | texto += to_ascii(city)[:35].ljust(35) # Plaza (ciudad) | 222 | texto += converter.to_ascii(cr, uid, city)[:35].ljust(35) # Plaza (ciudad) |
2400 | 212 | texto += to_ascii(zip)[:5].zfill(5) # CP | 223 | texto += converter.to_ascii(cr, uid, zip)[:5].zfill(5) # CP |
2401 | 213 | texto += to_ascii(ord_city)[:38].ljust(38) # Localidad del ordenante (ciudad) | 224 | texto += converter.to_ascii(cr, uid, ord_city)[:38].ljust(38) # Localidad del ordenante (ciudad) |
2402 | 214 | if alt_format: | 225 | if alt_format: |
2403 | 215 | # | 226 | # |
2404 | 216 | # Si usamos el formato alternativo (basado en FacturaPlus) | 227 | # Si usamos el formato alternativo (basado en FacturaPlus) |
2405 | @@ -223,7 +234,7 @@ | |||
2406 | 223 | texto += date_ct.strftime('%d%m%y') # Fecha crédito | 234 | texto += date_ct.strftime('%d%m%y') # Fecha crédito |
2407 | 224 | texto += 2*' ' | 235 | texto += 2*' ' |
2408 | 225 | else: | 236 | else: |
2410 | 226 | texto += to_ascii(ord_state_code)[:2].zfill(2) # Cod prov del ordenante | 237 | texto += converter.to_ascii(cr, uid, ord_state_code)[:2].zfill(2) # Cod prov del ordenante |
2411 | 227 | texto += date_ct.strftime('%d%m%y') # Fecha crédito | 238 | texto += date_ct.strftime('%d%m%y') # Fecha crédito |
2412 | 228 | texto += 8*' ' # Libre | 239 | texto += 8*' ' # Libre |
2413 | 229 | texto += '\r\n' | 240 | texto += '\r\n' |
2414 | @@ -232,7 +243,7 @@ | |||
2415 | 232 | return texto | 243 | return texto |
2416 | 233 | 244 | ||
2417 | 234 | 245 | ||
2419 | 235 | def _total_ordenante_58(self): | 246 | def _total_ordenante_58(self, cr, uid): |
2420 | 236 | texto = '5870' | 247 | texto = '5870' |
2421 | 237 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) | 248 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) |
2422 | 238 | texto += 72*' ' | 249 | texto += 72*' ' |
2423 | @@ -247,7 +258,7 @@ | |||
2424 | 247 | raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Total ordenante 58', texto), True) | 258 | raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Total ordenante 58', texto), True) |
2425 | 248 | return texto | 259 | return texto |
2426 | 249 | 260 | ||
2428 | 250 | def _total_general_58(self): | 261 | def _total_general_58(self, cr, uid): |
2429 | 251 | texto = '5970' | 262 | texto = '5970' |
2430 | 252 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) | 263 | texto += (self.order.mode.bank_id.partner_id.vat[2:] + self.order.mode.sufijo).zfill(12) |
2431 | 253 | texto += 52*' ' | 264 | texto += 52*' ' |
2432 | @@ -264,39 +275,34 @@ | |||
2433 | 264 | raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Total general 58', texto), True) | 275 | raise Log(_('Configuration error:\n\nThe line "%s" is not 162 characters long:\n%s') % ('Total general 58', texto), True) |
2434 | 265 | return texto | 276 | return texto |
2435 | 266 | 277 | ||
2440 | 267 | def create_file(self, pool, cr, uid, order, lines, context): | 278 | def create_file(self, cr, uid, order, lines, context): |
2437 | 268 | self.pool = pool | ||
2438 | 269 | self.cr = cr | ||
2439 | 270 | self.uid = uid | ||
2441 | 271 | self.order = order | 279 | self.order = order |
2442 | 272 | self.context = context | ||
2443 | 273 | 280 | ||
2444 | 274 | txt_remesa = '' | 281 | txt_remesa = '' |
2445 | 275 | self.num_recibos = 0 | 282 | self.num_recibos = 0 |
2446 | 276 | self.num_lineas_opc = 0 | 283 | self.num_lineas_opc = 0 |
2447 | 277 | 284 | ||
2450 | 278 | txt_remesa += self._cabecera_presentador_58() | 285 | txt_remesa += self._cabecera_presentador_58(cr, uid) |
2451 | 279 | txt_remesa += self._cabecera_ordenante_58() | 286 | txt_remesa += self._cabecera_ordenante_58(cr, uid) |
2452 | 280 | 287 | ||
2453 | 281 | for recibo in lines: | 288 | for recibo in lines: |
2455 | 282 | txt_remesa += self._individual_obligatorio_58(recibo) | 289 | txt_remesa += self._individual_obligatorio_58(cr, uid, recibo) |
2456 | 283 | self.num_recibos = self.num_recibos + 1 | 290 | self.num_recibos = self.num_recibos + 1 |
2457 | 284 | 291 | ||
2458 | 285 | # Sólo emitimos el registro individual si communication2 contiene texto | 292 | # Sólo emitimos el registro individual si communication2 contiene texto |
2459 | 286 | if recibo['communication2'] and len(recibo['communication2'].strip()) > 0: | 293 | if recibo['communication2'] and len(recibo['communication2'].strip()) > 0: |
2461 | 287 | txt_remesa += self._individual_opcional_58(recibo) | 294 | txt_remesa += self._individual_opcional_58(cr, uid, recibo) |
2462 | 288 | self.num_lineas_opc = self.num_lineas_opc + 1 | 295 | self.num_lineas_opc = self.num_lineas_opc + 1 |
2463 | 289 | 296 | ||
2464 | 290 | # Para recibos no domiciliados, añadimos el registro obligatorio | 297 | # Para recibos no domiciliados, añadimos el registro obligatorio |
2465 | 291 | # de domicilio (necesario con algunos bancos/cajas). | 298 | # de domicilio (necesario con algunos bancos/cajas). |
2466 | 292 | if self.order.mode.inc_domicile: | 299 | if self.order.mode.inc_domicile: |
2468 | 293 | txt_remesa += self._registro_obligatorio_domicilio_58(recibo) | 300 | txt_remesa += self._registro_obligatorio_domicilio_58(cr, uid, recibo) |
2469 | 294 | self.num_lineas_opc = self.num_lineas_opc + 1 | 301 | self.num_lineas_opc = self.num_lineas_opc + 1 |
2470 | 295 | 302 | ||
2473 | 296 | txt_remesa += self._total_ordenante_58() | 303 | txt_remesa += self._total_ordenante_58(cr, uid) |
2474 | 297 | txt_remesa += self._total_general_58() | 304 | txt_remesa += self._total_general_58(cr, uid) |
2475 | 298 | 305 | ||
2476 | 299 | return txt_remesa | 306 | return txt_remesa |
2477 | 300 | 307 | ||
2480 | 301 | 308 | csb_58() | |
2479 | 302 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | ||
2481 | 303 | 309 | ||
2482 | === modified file 'l10n_es_payment_order/wizard/export_remesas.py' | |||
2483 | --- l10n_es_payment_order/wizard/export_remesas.py 2012-05-29 12:23:40 +0000 | |||
2484 | +++ l10n_es_payment_order/wizard/export_remesas.py 2013-01-11 10:23:22 +0000 | |||
2485 | @@ -21,6 +21,12 @@ | |||
2486 | 21 | # Añadidos conceptos extras del CSB 19: Acysos S.L. 2011 | 21 | # Añadidos conceptos extras del CSB 19: Acysos S.L. 2011 |
2487 | 22 | # Ignacio Ibeas <ignacio@acysos.com> | 22 | # Ignacio Ibeas <ignacio@acysos.com> |
2488 | 23 | # | 23 | # |
2489 | 24 | # Migración de wizard.interface para la 6.1: Pexego Sistemas Informáticos. 2012 | ||
2490 | 25 | # Marta Vázquez Rodríguez <marta@pexego.es> | ||
2491 | 26 | # | ||
2492 | 27 | # Refactorización. Acysos S.L. (http://www.acysos.com) 2012 | ||
2493 | 28 | # Ignacio Ibeas <ignacio@acysos.com> | ||
2494 | 29 | # | ||
2495 | 24 | # This program is free software: you can redistribute it and/or modify | 30 | # This program is free software: you can redistribute it and/or modify |
2496 | 25 | # it under the terms of the GNU Affero General Public License as published by | 31 | # it under the terms of the GNU Affero General Public License as published by |
2497 | 26 | # the Free Software Foundation, either version 3 of the License, or | 32 | # the Free Software Foundation, either version 3 of the License, or |
2498 | @@ -36,180 +42,130 @@ | |||
2499 | 36 | # | 42 | # |
2500 | 37 | ############################################################################## | 43 | ############################################################################## |
2501 | 38 | 44 | ||
2504 | 39 | import pooler | 45 | from osv import osv, fields |
2503 | 40 | import wizard | ||
2505 | 41 | import base64 | 46 | import base64 |
2506 | 42 | from tools.translate import _ | 47 | from tools.translate import _ |
2675 | 43 | from converter import * | 48 | from log import * |
2676 | 44 | import csb_19 | 49 | |
2677 | 45 | import csb_32 | 50 | |
2678 | 46 | import csb_34 | 51 | |
2679 | 47 | import csb_34_01 | 52 | class wizard_payment_file_spain(osv.osv_memory): |
2680 | 48 | import csb_58 | 53 | _name = 'wizard.payment.file.spain' |
2681 | 49 | 54 | _columns = { | |
2682 | 50 | join_form = """<?xml version="1.0"?> | 55 | 'join': fields.boolean('Join payment lines of the same partner and bank account'), |
2683 | 51 | <form string="Payment order export"> | 56 | 'pay': fields.binary('Payment order file', readonly=True), |
2684 | 52 | <field name="join"/> | 57 | 'pay_fname': fields.char('File name', size=64), |
2685 | 53 | </form>""" | 58 | 'note': fields.text('Log') |
2518 | 54 | |||
2519 | 55 | join_fields = { | ||
2520 | 56 | 'join' : {'string':'Join payment lines of the same partner and bank account', 'type':'boolean'}, | ||
2521 | 57 | } | ||
2522 | 58 | |||
2523 | 59 | export_form = """<?xml version="1.0"?> | ||
2524 | 60 | <form string="Payment order export"> | ||
2525 | 61 | <field name="pay" filename="pay_fname"/> | ||
2526 | 62 | <field name="pay_fname" invisible="1"/> | ||
2527 | 63 | <field name="note" colspan="4" nolabel="1"/> | ||
2528 | 64 | </form>""" | ||
2529 | 65 | |||
2530 | 66 | export_fields = { | ||
2531 | 67 | 'pay' : { | ||
2532 | 68 | 'string':'Payment order file', | ||
2533 | 69 | 'type':'binary', | ||
2534 | 70 | 'required': False, | ||
2535 | 71 | 'readonly':True, | ||
2536 | 72 | }, | ||
2537 | 73 | 'pay_fname': {'string':'File name', 'type':'char', 'size':64}, | ||
2538 | 74 | 'note' : {'string':'Log', 'type':'text'}, | ||
2539 | 75 | } | ||
2540 | 76 | |||
2541 | 77 | |||
2542 | 78 | def _create_payment_file(self, cr, uid, data, context): | ||
2543 | 79 | |||
2544 | 80 | txt_remesa = '' | ||
2545 | 81 | num_lineas_opc = 0 | ||
2546 | 82 | |||
2547 | 83 | try: | ||
2548 | 84 | pool = pooler.get_pool(cr.dbname) | ||
2549 | 85 | orden = pool.get('payment.order').browse(cr, uid, data['id'], context) | ||
2550 | 86 | if not orden.line_ids: | ||
2551 | 87 | raise Log( _('User error:\n\nWizard can not generate export file, there are not payment lines.'), True ) | ||
2552 | 88 | |||
2553 | 89 | # Comprobamos que exista número de C.C. y que tenga 20 dígitos | ||
2554 | 90 | if not orden.mode.bank_id: | ||
2555 | 91 | raise Log( _('User error:\n\nThe bank account of the company %s is not defined.') % (orden.mode.partner_id.name), True ) | ||
2556 | 92 | cc = digits_only(orden.mode.bank_id.acc_number) | ||
2557 | 93 | if len(cc) != 20: | ||
2558 | 94 | raise Log( _('User error:\n\nThe bank account number of the company %s has not 20 digits.') % (orden.mode.partner_id.name), True) | ||
2559 | 95 | |||
2560 | 96 | # Comprobamos que exista el CIF de la compañía asociada al C.C. del modo de pago | ||
2561 | 97 | if not orden.mode.bank_id.partner_id.vat: | ||
2562 | 98 | raise Log(_('User error:\n\nThe company VAT number related to the bank account of the payment mode is not defined.'), True) | ||
2563 | 99 | |||
2564 | 100 | recibos = [] | ||
2565 | 101 | if data['form']['join']: | ||
2566 | 102 | # Lista con todos los partners+bancos diferentes de la remesa | ||
2567 | 103 | partner_bank_l = reduce(lambda l, x: x not in l and l.append(x) or l, | ||
2568 | 104 | [(recibo.partner_id,recibo.bank_id) for recibo in orden.line_ids], []) | ||
2569 | 105 | # Cómputo de la lista de recibos agrupados por mismo partner+banco. | ||
2570 | 106 | # Los importes se suman, los textos se concatenan con un espacio en blanco y las fechas se escoge el máximo | ||
2571 | 107 | for partner,bank in partner_bank_l: | ||
2572 | 108 | lineas = [recibo for recibo in orden.line_ids if recibo.partner_id==partner and recibo.bank_id==bank] | ||
2573 | 109 | recibos.append({ | ||
2574 | 110 | 'partner_id': partner, | ||
2575 | 111 | 'bank_id': bank, | ||
2576 | 112 | 'name': partner.ref or str(l.partner_id.id), | ||
2577 | 113 | 'amount': reduce(lambda x, y: x+y, [l.amount for l in lineas], 0), | ||
2578 | 114 | 'communication': reduce(lambda x, y: x+' '+(y or ''), [l.name+' '+l.communication for l in lineas], ''), | ||
2579 | 115 | 'communication2': reduce(lambda x, y: x+' '+(y or ''), [l.communication2 for l in lineas], ''), | ||
2580 | 116 | 'date': max([l.date for l in lineas]), | ||
2581 | 117 | 'ml_maturity_date': max([l.ml_maturity_date for l in lineas]), | ||
2582 | 118 | 'create_date': max([l.create_date for l in lineas]), | ||
2583 | 119 | 'ml_date_created': max([l.ml_date_created for l in lineas]), | ||
2584 | 120 | 'ml_inv_ref': [l.ml_inv_ref for l in lineas] | ||
2585 | 121 | }) | ||
2586 | 122 | else: | ||
2587 | 123 | # Cada línea de pago es un recibo | ||
2588 | 124 | for l in orden.line_ids: | ||
2589 | 125 | recibos.append({ | ||
2590 | 126 | 'partner_id': l.partner_id, | ||
2591 | 127 | 'bank_id': l.bank_id, | ||
2592 | 128 | 'name': l.partner_id.ref or str(l.partner_id.id), | ||
2593 | 129 | 'amount': l.amount, | ||
2594 | 130 | 'communication': l.name+' '+l.communication, | ||
2595 | 131 | 'communication2': l.communication2, | ||
2596 | 132 | 'date': l.date, | ||
2597 | 133 | 'ml_maturity_date': l.ml_maturity_date, | ||
2598 | 134 | 'create_date': l.create_date, | ||
2599 | 135 | 'ml_date_created': l.ml_date_created, | ||
2600 | 136 | 'ml_inv_ref':[l.ml_inv_ref] | ||
2601 | 137 | }) | ||
2602 | 138 | |||
2603 | 139 | if orden.mode.require_bank_account: | ||
2604 | 140 | for line in recibos: | ||
2605 | 141 | ccc = line['bank_id'] and line['bank_id'].acc_number or False | ||
2606 | 142 | if not ccc: | ||
2607 | 143 | raise Log(_('User error:\n\nThe bank account number of the customer %s is not defined and current payment mode enforces all lines to have a bank account.') % (line['partner_id'].name), True) | ||
2608 | 144 | ccc = digits_only(ccc) | ||
2609 | 145 | if len(ccc) != 20: | ||
2610 | 146 | raise Log(_('User error:\n\nThe bank account number of the customer %s has not 20 digits.') % (line['partner_id'].name), True) | ||
2611 | 147 | |||
2612 | 148 | if orden.mode.tipo == 'csb_19': | ||
2613 | 149 | csb = csb_19.csb_19() | ||
2614 | 150 | elif orden.mode.tipo == 'csb_32': | ||
2615 | 151 | csb = csb_32.csb_32() | ||
2616 | 152 | elif orden.mode.tipo == 'csb_34': | ||
2617 | 153 | csb = csb_34.csb_34() | ||
2618 | 154 | elif orden.mode.tipo == '34_01': | ||
2619 | 155 | csb = csb_34_01.csb_34_01() | ||
2620 | 156 | elif orden.mode.tipo == 'csb_58': | ||
2621 | 157 | csb = csb_58.csb_58() | ||
2622 | 158 | else: | ||
2623 | 159 | raise Log(_('User error:\n\nThe payment mode is not CSB 19, CSB 32, CSB 34 or CSB 58'), True) | ||
2624 | 160 | txt_remesa = csb.create_file(pool, cr, uid, orden, recibos, context) | ||
2625 | 161 | |||
2626 | 162 | except Log, log: | ||
2627 | 163 | return { | ||
2628 | 164 | 'note': log(), | ||
2629 | 165 | 'reference': orden.id, | ||
2630 | 166 | 'pay': False, | ||
2631 | 167 | 'state':'failed' | ||
2632 | 168 | } | ||
2633 | 169 | else: | ||
2634 | 170 | # Ensure line breaks use MS-DOS (CRLF) format as standards require. | ||
2635 | 171 | txt_remesa = txt_remesa.replace('\r\n','\n').replace('\n','\r\n') | ||
2636 | 172 | |||
2637 | 173 | file = base64.encodestring(txt_remesa.encode('utf-8')) | ||
2638 | 174 | fname = (_('remesa') + '_' + orden.mode.tipo + '_' + orden.reference + '.txt').replace('/','-') | ||
2639 | 175 | pool.get('ir.attachment').create(cr, uid, { | ||
2640 | 176 | 'name': _('Remesa ') + orden.mode.tipo + ' ' + orden.reference, | ||
2641 | 177 | 'datas': file, | ||
2642 | 178 | 'datas_fname': fname, | ||
2643 | 179 | 'res_model': 'payment.order', | ||
2644 | 180 | 'res_id': orden.id, | ||
2645 | 181 | }, context=context) | ||
2646 | 182 | log = _("Successfully Exported\n\nSummary:\n Total amount paid: %.2f\n Total Number of Payments: %d\n") % (orden.total, len(recibos)) | ||
2647 | 183 | if orden.state == 'open': | ||
2648 | 184 | pool.get('payment.order').set_done(cr, uid, [orden.id], context) | ||
2649 | 185 | return { | ||
2650 | 186 | 'note': log, | ||
2651 | 187 | 'reference': orden.id, | ||
2652 | 188 | 'pay': file, | ||
2653 | 189 | 'pay_fname': fname, | ||
2654 | 190 | 'state': 'succeeded', | ||
2655 | 191 | } | ||
2656 | 192 | |||
2657 | 193 | |||
2658 | 194 | class wizard_payment_file_spain(wizard.interface): | ||
2659 | 195 | states = { | ||
2660 | 196 | 'init' : { | ||
2661 | 197 | 'actions' : [], | ||
2662 | 198 | 'result' : {'type' : 'form', | ||
2663 | 199 | 'arch' : join_form, | ||
2664 | 200 | 'fields' : join_fields, | ||
2665 | 201 | 'state' : [('export', 'Ok','gtk-ok') ]} | ||
2666 | 202 | }, | ||
2667 | 203 | 'export': { | ||
2668 | 204 | 'actions' : [_create_payment_file], | ||
2669 | 205 | 'result' : {'type' : 'form', | ||
2670 | 206 | 'arch' : export_form, | ||
2671 | 207 | 'fields' : export_fields, | ||
2672 | 208 | 'state' : [('end', 'Ok','gtk-ok') ]} | ||
2673 | 209 | } | ||
2674 | 210 | |||
2686 | 211 | } | 59 | } |
2690 | 212 | wizard_payment_file_spain('export_payment_file_spain') | 60 | |
2691 | 213 | 61 | def create_payment_file(self, cr, uid, ids, context): | |
2692 | 214 | # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: | 62 | converter = self.pool.get('payment.converter.spain') |
2693 | 63 | txt_remesa = '' | ||
2694 | 64 | num_lineas_opc = 0 | ||
2695 | 65 | form_obj = self.browse(cr, uid, ids)[0] | ||
2696 | 66 | try: | ||
2697 | 67 | orden = self.pool.get('payment.order').browse(cr, uid, context['active_id'], context) | ||
2698 | 68 | if not orden.line_ids: | ||
2699 | 69 | raise Log( _('User error:\n\nWizard can not generate export file, there are not payment lines.'), True ) | ||
2700 | 70 | |||
2701 | 71 | # Comprobamos que exista número de C.C. y que tenga 20 dígitos | ||
2702 | 72 | if not orden.mode.bank_id: | ||
2703 | 73 | raise Log( _('User error:\n\nThe bank account of the company %s is not defined.') % (orden.mode.partner_id.name), True ) | ||
2704 | 74 | cc = converter.digits_only(cr,uid,orden.mode.bank_id.acc_number) | ||
2705 | 75 | if len(cc) != 20: | ||
2706 | 76 | raise Log( _('User error:\n\nThe bank account number of the company %s has not 20 digits.') % (orden.mode.partner_id.name), True) | ||
2707 | 77 | |||
2708 | 78 | # Comprobamos que exista el CIF de la compañía asociada al C.C. del modo de pago | ||
2709 | 79 | if not orden.mode.bank_id.partner_id.vat: | ||
2710 | 80 | raise Log(_('User error:\n\nThe company VAT number related to the bank account of the payment mode is not defined.'), True) | ||
2711 | 81 | |||
2712 | 82 | recibos = [] | ||
2713 | 83 | if form_obj.join: | ||
2714 | 84 | # Lista con todos los partners+bancos diferentes de la remesa | ||
2715 | 85 | partner_bank_l = reduce(lambda l, x: x not in l and l.append(x) or l, | ||
2716 | 86 | [(recibo.partner_id,recibo.bank_id) for recibo in orden.line_ids], []) | ||
2717 | 87 | # Cómputo de la lista de recibos agrupados por mismo partner+banco. | ||
2718 | 88 | # Los importes se suman, los textos se concatenan con un espacio en blanco y las fechas se escoge el máximo | ||
2719 | 89 | for partner,bank in partner_bank_l: | ||
2720 | 90 | lineas = [recibo for recibo in orden.line_ids if recibo.partner_id==partner and recibo.bank_id==bank] | ||
2721 | 91 | recibos.append({ | ||
2722 | 92 | 'partner_id': partner, | ||
2723 | 93 | 'bank_id': bank, | ||
2724 | 94 | 'name': partner.ref or str(l.partner_id.id), | ||
2725 | 95 | 'amount': reduce(lambda x, y: x+y, [l.amount for l in lineas], 0), | ||
2726 | 96 | 'communication': reduce(lambda x, y: x+' '+(y or ''), [l.name+' '+l.communication for l in lineas], ''), | ||
2727 | 97 | 'communication2': reduce(lambda x, y: x+' '+(y or ''), [l.communication2 for l in lineas], ''), | ||
2728 | 98 | 'date': max([l.date for l in lineas]), | ||
2729 | 99 | 'ml_maturity_date': max([l.ml_maturity_date for l in lineas]), | ||
2730 | 100 | 'create_date': max([l.create_date for l in lineas]), | ||
2731 | 101 | 'ml_date_created': max([l.ml_date_created for l in lineas]), | ||
2732 | 102 | 'ml_inv_ref': [l.ml_inv_ref for l in lineas] | ||
2733 | 103 | }) | ||
2734 | 104 | else: | ||
2735 | 105 | # Cada línea de pago es un recibo | ||
2736 | 106 | for l in orden.line_ids: | ||
2737 | 107 | recibos.append({ | ||
2738 | 108 | 'partner_id': l.partner_id, | ||
2739 | 109 | 'bank_id': l.bank_id, | ||
2740 | 110 | 'name': l.partner_id.ref or str(l.partner_id.id), | ||
2741 | 111 | 'amount': l.amount, | ||
2742 | 112 | 'communication': l.name+' '+l.communication, | ||
2743 | 113 | 'communication2': l.communication2, | ||
2744 | 114 | 'date': l.date, | ||
2745 | 115 | 'ml_maturity_date': l.ml_maturity_date, | ||
2746 | 116 | 'create_date': l.create_date, | ||
2747 | 117 | 'ml_date_created': l.ml_date_created, | ||
2748 | 118 | 'ml_inv_ref':[l.ml_inv_ref] | ||
2749 | 119 | }) | ||
2750 | 120 | |||
2751 | 121 | if orden.mode.require_bank_account: | ||
2752 | 122 | for line in recibos: | ||
2753 | 123 | ccc = line['bank_id'] and line['bank_id'].acc_number or False | ||
2754 | 124 | if not ccc: | ||
2755 | 125 | raise Log(_('User error:\n\nThe bank account number of the customer %s is not defined and current payment mode enforces all lines to have a bank account.') % (line['partner_id'].name), True) | ||
2756 | 126 | ccc = converter.digits_only(cr,uid,ccc) | ||
2757 | 127 | if len(ccc) != 20: | ||
2758 | 128 | raise Log(_('User error:\n\nThe bank account number of the customer %s has not 20 digits.') % (line['partner_id'].name), True) | ||
2759 | 129 | |||
2760 | 130 | if orden.mode.tipo == 'csb_19': | ||
2761 | 131 | csb = self.pool.get('csb.19') | ||
2762 | 132 | elif orden.mode.tipo == 'csb_32': | ||
2763 | 133 | csb = self.pool.get('csb.32') | ||
2764 | 134 | elif orden.mode.tipo == 'csb_34': | ||
2765 | 135 | csb = self.pool.get('csb.34') | ||
2766 | 136 | elif orden.mode.tipo == '34_01': | ||
2767 | 137 | csb = self.pool.get('csb.3401') | ||
2768 | 138 | elif orden.mode.tipo == 'csb_58': | ||
2769 | 139 | csb = self.pool.get('csb.58') | ||
2770 | 140 | else: | ||
2771 | 141 | raise Log(_('User error:\n\nThe payment mode is not CSB 19, CSB 32, CSB 34 or CSB 58'), True) | ||
2772 | 142 | txt_remesa = csb.create_file(cr, uid, orden, recibos, context) | ||
2773 | 143 | |||
2774 | 144 | except Log, log: | ||
2775 | 145 | form_obj.write({'note': log,'pay': False}) | ||
2776 | 146 | return True | ||
2777 | 147 | |||
2778 | 148 | else: | ||
2779 | 149 | # Ensure line breaks use MS-DOS (CRLF) format as standards require. | ||
2780 | 150 | txt_remesa = txt_remesa.replace('\r\n','\n').replace('\n','\r\n') | ||
2781 | 151 | |||
2782 | 152 | file = base64.encodestring(txt_remesa.encode('utf-8')) | ||
2783 | 153 | fname = (_('remesa') + '_' + orden.mode.tipo + '_' + orden.reference + '.txt').replace('/','-') | ||
2784 | 154 | self.pool.get('ir.attachment').create(cr, uid, { | ||
2785 | 155 | 'name': _('Remesa ') + orden.mode.tipo + ' ' + orden.reference, | ||
2786 | 156 | 'datas': file, | ||
2787 | 157 | 'datas_fname': fname, | ||
2788 | 158 | 'res_model': 'payment.order', | ||
2789 | 159 | 'res_id': orden.id, | ||
2790 | 160 | }, context=context) | ||
2791 | 161 | log = _("Successfully Exported\n\nSummary:\n Total amount paid: %.2f\n Total Number of Payments: %d\n") % (orden.total, len(recibos)) | ||
2792 | 162 | self.pool.get('payment.order').set_done(cr, uid, [orden.id], context) | ||
2793 | 163 | |||
2794 | 164 | form_obj.write({'note': log,'pay': file,'pay_fname': fname}) | ||
2795 | 165 | |||
2796 | 166 | return True | ||
2797 | 167 | wizard_payment_file_spain() | ||
2798 | 168 | |||
2799 | 169 | |||
2800 | 170 | |||
2801 | 215 | 171 | ||
2802 | 216 | 172 | ||
2803 | === added file 'l10n_es_payment_order/wizard/export_remesas_view.xml' | |||
2804 | --- l10n_es_payment_order/wizard/export_remesas_view.xml 1970-01-01 00:00:00 +0000 | |||
2805 | +++ l10n_es_payment_order/wizard/export_remesas_view.xml 2013-01-11 10:23:22 +0000 | |||
2806 | @@ -0,0 +1,40 @@ | |||
2807 | 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2808 | 2 | <openerp> | ||
2809 | 3 | <data> | ||
2810 | 4 | <record id="view_wizard_payment_file_spain_form" model="ir.ui.view"> | ||
2811 | 5 | <field name="name">wizard.payment.file.spain.form</field> | ||
2812 | 6 | <field name="model">wizard.payment.file.spain</field> | ||
2813 | 7 | <field name="type">form</field> | ||
2814 | 8 | <field name="arch" type="xml"> | ||
2815 | 9 | <form string="Payment order export"> | ||
2816 | 10 | <field name="join"/> | ||
2817 | 11 | <field name="pay" filename="pay_fname"/> | ||
2818 | 12 | <field name="pay_fname" invisible="1"/> | ||
2819 | 13 | <field name="note" colspan="4" nolabel="1"/> | ||
2820 | 14 | <separator string="" colspan="4" /> | ||
2821 | 15 | <group colspan="4" col="6"> | ||
2822 | 16 | <button icon="gtk-cancel" special="cancel" string="Cancel"/> | ||
2823 | 17 | <button icon="gtk-execute" string="_Export" name="create_payment_file" type="object"/> | ||
2824 | 18 | </group> | ||
2825 | 19 | </form> | ||
2826 | 20 | </field> | ||
2827 | 21 | </record> | ||
2828 | 22 | |||
2829 | 23 | <record id="action_wizard_payment_file_spain" model="ir.actions.act_window"> | ||
2830 | 24 | <field name="name">Create payments file</field> | ||
2831 | 25 | <field name="res_model">wizard.payment.file.spain</field> | ||
2832 | 26 | <field name="view_type">form</field> | ||
2833 | 27 | <field name="view_mode">tree,form</field> | ||
2834 | 28 | <field name="view_id" ref="view_wizard_payment_file_spain_form"/> | ||
2835 | 29 | <field name="target">new</field> | ||
2836 | 30 | </record> | ||
2837 | 31 | <record id="action_wizard_payment_file_spain2" model="ir.values"> | ||
2838 | 32 | <field name="object" eval="1" /> | ||
2839 | 33 | <field name="name">Create payments file</field> | ||
2840 | 34 | <field name="key2">client_action_multi</field> | ||
2841 | 35 | <field name="value" eval="'ir.actions.act_window,' + str(ref('action_wizard_payment_file_spain'))"/> | ||
2842 | 36 | <field name="key">action</field> | ||
2843 | 37 | <field name="model">payment.order</field> | ||
2844 | 38 | </record> | ||
2845 | 39 | </data> | ||
2846 | 40 | </openerp> | ||
2847 | 0 | 41 | ||
2848 | === added file 'l10n_es_payment_order/wizard/log.py' | |||
2849 | --- l10n_es_payment_order/wizard/log.py 1970-01-01 00:00:00 +0000 | |||
2850 | +++ l10n_es_payment_order/wizard/log.py 2013-01-11 10:23:22 +0000 | |||
2851 | @@ -0,0 +1,45 @@ | |||
2852 | 1 | # -*- coding: utf-8 -*- | ||
2853 | 2 | ############################################################################## | ||
2854 | 3 | # | ||
2855 | 4 | # OpenERP, Open Source Management Solution | ||
2856 | 5 | # Copyright (c) 2006 ACYSOS S.L. (http://acysos.com) All Rights Reserved. | ||
2857 | 6 | # Pedro Tarrafeta <pedro@acysos.com> | ||
2858 | 7 | # Copyright (c) 2008 Pablo Rocandio. All Rights Reserved. | ||
2859 | 8 | # Copyright (c) 2009 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved. | ||
2860 | 9 | # Jordi Esteve <jesteve@zikzakmedia.com> | ||
2861 | 10 | # Copyright (c) 2009 NaN (http://www.nan-tic.com) All Rights Reserved. | ||
2862 | 11 | # Albert Cervera i Areny <albert@nan-tic.com> | ||
2863 | 12 | # $Id$ | ||
2864 | 13 | # Refactorización. Acysos S.L. (http://www.acysos.com) 2012 | ||
2865 | 14 | # Ignacio Ibeas <ignacio@acysos.com> | ||
2866 | 15 | # | ||
2867 | 16 | # This program is free software: you can redistribute it and/or modify | ||
2868 | 17 | # it under the terms of the GNU Affero General Public License as published by | ||
2869 | 18 | # the Free Software Foundation, either version 3 of the License, or | ||
2870 | 19 | # (at your option) any later version. | ||
2871 | 20 | # | ||
2872 | 21 | # This program is distributed in the hope that it will be useful, | ||
2873 | 22 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
2874 | 23 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
2875 | 24 | # GNU Affero General Public License for more details. | ||
2876 | 25 | # | ||
2877 | 26 | # You should have received a copy of the GNU Affero General Public License | ||
2878 | 27 | # along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
2879 | 28 | # | ||
2880 | 29 | ############################################################################## | ||
2881 | 30 | |||
2882 | 31 | from tools.translate import _ | ||
2883 | 32 | |||
2884 | 33 | class Log(Exception): | ||
2885 | 34 | def __init__(self, content = '', error = False): | ||
2886 | 35 | self.content = content | ||
2887 | 36 | self.error = error | ||
2888 | 37 | def add(self, s, error=True): | ||
2889 | 38 | self.content = self.content + s | ||
2890 | 39 | if error: | ||
2891 | 40 | self.error = error | ||
2892 | 41 | def __call__(self): | ||
2893 | 42 | return self.content | ||
2894 | 43 | def __str__(self): | ||
2895 | 44 | return self.content | ||
2896 | 45 |
Genial trabajo. Dos puntualizaciones:
- El objeto "payment. converter. spain" al no tener un reflejo en la base de datos, se le puede poner el atributo "_auto = False" para evitar crear una tabla vacia en postgres.
- Si el código fuera PEP8, ya sería la releche.