Merge lp:~acysos-team/openerp-spain/openerp-spain-6.0-mod303 into lp:~openerp-spain-team/openerp-spain/6.0

Proposed by Ignacio Ibeas (www.acysos.com)
Status: Merged
Approved by: Ignacio Ibeas (www.acysos.com)
Approved revision: 349
Merged at revision: 351
Proposed branch: lp:~acysos-team/openerp-spain/openerp-spain-6.0-mod303
Merge into: lp:~openerp-spain-team/openerp-spain/6.0
Diff against target: 2018 lines (+1963/-0)
10 files modified
l10n_es_aeat_mod303/__init__.py (+26/-0)
l10n_es_aeat_mod303/__openerp__.py (+52/-0)
l10n_es_aeat_mod303/i18n/es.po (+555/-0)
l10n_es_aeat_mod303/i18n/l10n_es_aeat_mod303.pot (+535/-0)
l10n_es_aeat_mod303/mod303.py (+245/-0)
l10n_es_aeat_mod303/mod303_view.xml (+164/-0)
l10n_es_aeat_mod303/mod303_workflow.xml (+72/-0)
l10n_es_aeat_mod303/security/ir.model.access.csv (+6/-0)
l10n_es_aeat_mod303/wizard/__init__.py (+26/-0)
l10n_es_aeat_mod303/wizard/export_mod303_to_boe.py (+282/-0)
To merge this branch: bzr merge lp:~acysos-team/openerp-spain/openerp-spain-6.0-mod303
Reviewer Review Type Date Requested Status
Pedro Manuel Baeza code review Approve
Review via email: mp+190428@code.launchpad.net

Description of the change

Downgrade del AEAT Modelo 303.

To post a comment you must log in.
Revision history for this message
Pedro Manuel Baeza (pedro.baeza) wrote :

Yo ya no tengo ningún cliente en 6.0, por lo que no puedo probarlo, pero al ser un nuevo módulo, creo que puedes hacer el merge si en unos días nadie lo puede examinar, y luego si surge algún problema que se reporte vía bug. Algo que tengo pendiente es mejorar el módulo para también genere el asiento de IVA deudor/acreedor según el resultado. Ya te avisaré para hacer luego el backport si quieres.

Un saludo.

review: Approve (code review)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added directory 'l10n_es_aeat_mod303'
=== added file 'l10n_es_aeat_mod303/__init__.py'
--- l10n_es_aeat_mod303/__init__.py 1970-01-01 00:00:00 +0000
+++ l10n_es_aeat_mod303/__init__.py 2013-10-10 17:06:51 +0000
@@ -0,0 +1,26 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2012 Guadaltech. All Rights Reserved
6# Author: Isaac De la Barrera
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program. If not, see http://www.gnu.org/licenses/.
20#
21##############################################################################
22
23import mod303
24import wizard
25
26# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
0\ No newline at end of file27\ No newline at end of file
128
=== added file 'l10n_es_aeat_mod303/__openerp__.py'
--- l10n_es_aeat_mod303/__openerp__.py 1970-01-01 00:00:00 +0000
+++ l10n_es_aeat_mod303/__openerp__.py 2013-10-10 17:06:51 +0000
@@ -0,0 +1,52 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2013 Guadaltech. All Rights Reserved
6# Author: Alberto Martín Cortada
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program. If not, see http://www.gnu.org/licenses/.
20#
21##############################################################################
22
23{
24 "name" : "AEAT Model 303",
25 "version" : "1.0",
26 "author" : "GuadalTech",
27 "license" : "AGPL-3",
28 "website" : "http://www.guadaltech.es",
29 "category" : "Localisation/Accounting",
30 "description" :
31
32 """
33Módulo para la presentación del modelo 303. Exportación a formato AEAT.
34
35 """,
36
37 "init_xml" : [],
38 "depends" : [
39 "l10n_es_aeat","l10n_es_aeat_mod347"
40 ],
41 "update_xml" : [
42 "mod303_view.xml",
43 "mod303_workflow.xml",
44 "security/ir.model.access.csv",
45
46 ],
47 "demo_xml" : [],
48 "test" : [],
49 "installable" : True,
50 "active" : False,
51}
52# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
053
=== added directory 'l10n_es_aeat_mod303/i18n'
=== added file 'l10n_es_aeat_mod303/i18n/es.po'
--- l10n_es_aeat_mod303/i18n/es.po 1970-01-01 00:00:00 +0000
+++ l10n_es_aeat_mod303/i18n/es.po 2013-10-10 17:06:51 +0000
@@ -0,0 +1,555 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * l10n_es_aeat_mod303
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 6.1-20120617-233256\n"
8"Report-Msgid-Bugs-To: \n"
9"POT-Creation-Date: 2013-03-18 10:22+0000\n"
10"PO-Revision-Date: 2013-03-18 10:22+0000\n"
11"Last-Translator: <>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: \n"
16"Plural-Forms: \n"
17
18#. module: l10n_es_aeat_mod303
19#: view:l10n.es.aeat.mod303.report:0
20msgid "Confirmed models"
21msgstr "Modelos confirmados"
22
23#. module: l10n_es_aeat_mod303
24#: code:addons/l10n_es_aeat_mod303/wizard/export_mod303_to_boe.py:267
25#, python-format
26msgid "The 303 report must be 1353 characters long and are %s"
27msgstr "La declaración del modelo 303 debe tener 1353 caracteres, y actuamente son %s"
28
29#. module: l10n_es_aeat_mod303
30#: view:l10n.es.aeat.mod303.report:0
31msgid "AEAT 303 Reports"
32msgstr "Declaraciones AEAT 303"
33
34#. module: l10n_es_aeat_mod303
35#: field:l10n.es.aeat.mod303.report,representative_vat:0
36msgid "L.R. VAT number"
37msgstr "L.R. VAT number"
38
39#. module: l10n_es_aeat_mod303
40#: view:l10n.es.aeat.mod303.report:0
41msgid "Devolución"
42msgstr "Devolución"
43
44#. module: l10n_es_aeat_mod303
45#: model:ir.model,name:l10n_es_aeat_mod303.model_l10n_es_aeat_mod303_report
46#: view:l10n.es.aeat.mod303.report:0
47msgid "AEAT 303 Report"
48msgstr "Declaración AEAT 303"
49
50#. module: l10n_es_aeat_mod303
51#: selection:l10n.es.aeat.mod303.report,period:0
52msgid "March"
53msgstr "Marzo"
54
55#. module: l10n_es_aeat_mod303
56#: view:l10n.es.aeat.mod303.report:0
57#: field:l10n.es.aeat.mod303.report,company_id:0
58msgid "Company"
59msgstr "Company"
60
61#. module: l10n_es_aeat_mod303
62#: field:l10n.es.aeat.mod303.report,devolver:0
63msgid "Devolver"
64msgstr "Devolver"
65
66#. module: l10n_es_aeat_mod303
67#: code:addons/l10n_es_aeat_mod303/mod303.py:227
68#, python-format
69msgid "Seleccione una cuenta para ingresar el importe"
70msgstr "Seleccione una cuenta para ingresar el importe"
71
72#. module: l10n_es_aeat_mod303
73#: selection:l10n.es.aeat.mod303.report,type:0
74msgid "Substitutive"
75msgstr "Substitutive"
76
77#. module: l10n_es_aeat_mod303
78#: help:l10n.es.aeat.mod303.report,regularizacion_anual:0
79msgid "En la última autoliquidación del año (la del período 4T o mes 12) se hará constar, con el signo que corresponda, el resultado de la regularización anual conforme disponen las Leyes por las que se aprueban el Concierto Económico entre el Estado y la Comunidad Autónoma del País Vasco y el Convenio Económico entre el Estado y la Comunidad Foral de Navarra."
80msgstr "En la última autoliquidación del año (la del período 4T o mes 12) se hará constar, con el signo que corresponda, el resultado de la regularización anual conforme disponen las Leyes por las que se aprueban el Concierto Económico entre el Estado y la Comunidad Autónoma del País Vasco y el Convenio Económico entre el Estado y la Comunidad Foral de Navarra."
81
82#. module: l10n_es_aeat_mod303
83#: model:ir.actions.act_window,help:l10n_es_aeat_mod303.action_l10n_es_aeat_mod303_report
84msgid "Create and query AEAT Model 303 Reports"
85msgstr "Permite crear y consultar las declaraciones sobre el modelo AEAT 303"
86
87#. module: l10n_es_aeat_mod303
88#: field:l10n.es.aeat.mod303.report,cuota_compensar:0
89msgid "Cuotas a Compensar"
90msgstr "Cuotas a Compensar"
91
92#. module: l10n_es_aeat_mod303
93#: code:addons/l10n_es_aeat_mod303/mod303.py:153
94#, python-format
95msgid "El periodo seleccionado no coincide con los periodos del año fiscal:"
96msgstr "El periodo seleccionado no coincide con los periodos del año fiscal:"
97
98#. module: l10n_es_aeat_mod303
99#: view:l10n.es.aeat.mod303.report:0
100msgid "Cancelled"
101msgstr "Cancelado"
102
103#. module: l10n_es_aeat_mod303
104#: field:l10n.es.aeat.mod303.report,complementaria:0
105#: help:l10n.es.aeat.mod303.report,complementaria:0
106msgid "Autoliquidación Complementaria"
107msgstr "Autoliquidación Complementaria"
108
109#. module: l10n_es_aeat_mod303
110#: field:l10n.es.aeat.mod303.report,company_vat:0
111msgid "VAT number"
112msgstr "CIF/DNI"
113
114#. module: l10n_es_aeat_mod303
115#: help:l10n.es.aeat.mod303.report,resultado_casilla_46:0
116msgid "Atribuible a la admistracion [40] - Cuotas a compensar [41] + Regularización Anual [45]"
117msgstr "Atribuible a la admistracion [40] - Cuotas a compensar [41] + Regularización Anual [45]"
118
119#. module: l10n_es_aeat_mod303
120#: field:l10n.es.aeat.mod303.report,previus_result:0
121msgid "A Deducir"
122msgstr "A Deducir"
123
124#. module: l10n_es_aeat_mod303
125#: code:addons/l10n_es_aeat_mod303/wizard/export_mod303_to_boe.py:182
126#: code:addons/l10n_es_aeat_mod303/wizard/export_mod303_to_boe.py:204
127#, python-format
128msgid "Warning"
129msgstr "Warning"
130
131#. module: l10n_es_aeat_mod303
132#: help:l10n.es.aeat.mod303.report,previus_result:0
133msgid "Resultado de la anterior o anteriores del mismo concepto, ejercicio y periodo"
134msgstr "Resultado de la anterior o anteriores del mismo concepto, ejercicio y periodo"
135
136#. module: l10n_es_aeat_mod303
137#: view:l10n.es.aeat.mod303.report:0
138msgid "Confirm"
139msgstr "Confirmar"
140
141#. module: l10n_es_aeat_mod303
142#: help:l10n.es.aeat.mod303.report,porcentaje_atribuible_estado:0
143msgid "Los sujetos pasivos que tributen conjuntamente a la Administración del Estado y a las Diputaciones Forales del País Vasco o a la ComunidadForal de Navarra, consignarán en esta casilla el porcentaje del volumen de operaciones en territorio común. Los demás sujetos pasivos consignarán en esta casilla el 100%"
144msgstr "Los sujetos pasivos que tributen conjuntamente a la Administración del Estado y a las Diputaciones Forales del País Vasco o a la ComunidadForal de Navarra, consignarán en esta casilla el porcentaje del volumen de operaciones en territorio común. Los demás sujetos pasivos consignarán en esta casilla el 100%"
145
146#. module: l10n_es_aeat_mod303
147#: view:l10n.es.aeat.mod303.report:0
148msgid "Cancelled models"
149msgstr "Modelos cancelados"
150
151#. module: l10n_es_aeat_mod303
152#: field:l10n.es.aeat.mod303.report,state:0
153msgid "State"
154msgstr "Estado"
155
156#. module: l10n_es_aeat_mod303
157#: selection:l10n.es.aeat.mod303.report,period:0
158msgid "First quarter"
159msgstr "1er Trimestre"
160
161#. module: l10n_es_aeat_mod303
162#: model:ir.actions.act_window,name:l10n_es_aeat_mod303.action_l10n_es_aeat_mod303_report
163msgid "AEAT Model 303"
164msgstr "Modelo AEAT 303"
165
166#. module: l10n_es_aeat_mod303
167#: view:l10n.es.aeat.mod303.report:0
168msgid "AEAT 303"
169msgstr "AEAT 303"
170
171#. module: l10n_es_aeat_mod303
172#: code:addons/l10n_es_aeat_mod303/mod303.py:231
173#, python-format
174msgid "No hay actividad en el periodo seleccionado, marque la casilla correspondinte"
175msgstr "No hay actividad en el periodo seleccionado, marque la casilla correspondinte"
176
177#. module: l10n_es_aeat_mod303
178#: model:ir.ui.menu,name:l10n_es_aeat_mod303.menu_aeat_mod303_report
179msgid "AEAT 303 Model"
180msgstr "Modelo AEAT 303"
181
182#. module: l10n_es_aeat_mod303
183#: field:l10n.es.aeat.mod303.report,support_type:0
184msgid "Support Type"
185msgstr "Tipo de Soporte"
186
187#. module: l10n_es_aeat_mod303
188#: code:addons/l10n_es_aeat_mod303/wizard/export_mod303_to_boe.py:274
189#, python-format
190msgid "%Y-%m-%d"
191msgstr "%Y-%m-%d"
192
193#. module: l10n_es_aeat_mod303
194#: view:l10n.es.aeat.mod303.report:0
195msgid "Export to BOE"
196msgstr "Exportar a formato BOE"
197
198#. module: l10n_es_aeat_mod303
199#: selection:l10n.es.aeat.mod303.report,period:0
200msgid "July"
201msgstr "Julio"
202
203#. module: l10n_es_aeat_mod303
204#: code:addons/l10n_es_aeat_mod303/mod303.py:229
205#, python-format
206msgid "Seleccione una cuenta para realizar la devolución"
207msgstr "Seleccione una cuenta para realizar la devolución"
208
209#. module: l10n_es_aeat_mod303
210#: help:l10n.es.aeat.mod303.report,devolucion_mensual:0
211msgid "Inscrito en el Registro de Devolución Mensual"
212msgstr "Inscrito en el Registro de Devolución Mensual"
213
214#. module: l10n_es_aeat_mod303
215#: code:addons/l10n_es_aeat_mod303/wizard/export_mod303_to_boe.py:182
216#, python-format
217msgid "CCC de devolución no válida \n"
218"%s"
219msgstr "CCC de devolución no válida \n"
220"%s"
221
222#. module: l10n_es_aeat_mod303
223#: field:l10n.es.aeat.mod303.report,calculation_date:0
224msgid "Calculation date"
225msgstr "Fecha de cálculo"
226
227#. module: l10n_es_aeat_mod303
228#: field:l10n.es.aeat.mod303.report,contact_name:0
229msgid "Full Name"
230msgstr "Nombre Completo"
231
232#. module: l10n_es_aeat_mod303
233#: view:l10n.es.aeat.mod303.report:0
234msgid "Declaracion"
235msgstr "Declaracion"
236
237#. module: l10n_es_aeat_mod303
238#: field:l10n.es.aeat.mod303.report,ingresar:0
239msgid "Ingresar"
240msgstr "Ingresar"
241
242#. module: l10n_es_aeat_mod303
243#: view:l10n.es.aeat.mod303.report:0
244msgid "Draft models"
245msgstr "Modelos borrador"
246
247#. module: l10n_es_aeat_mod303
248#: selection:l10n.es.aeat.mod303.report,period:0
249msgid "September"
250msgstr "Septiembre"
251
252#. module: l10n_es_aeat_mod303
253#: selection:l10n.es.aeat.mod303.report,period:0
254msgid "December"
255msgstr "Diciembre"
256
257#. module: l10n_es_aeat_mod303
258#: field:l10n.es.aeat.mod303.report,number:0
259msgid "Declaration Number"
260msgstr "Número Declaración"
261
262#. module: l10n_es_aeat_mod303
263#: field:l10n.es.aeat.mod303.report,total_deducir:0
264msgid "IVA a Deducir"
265msgstr "IVA a Deducir"
266
267#. module: l10n_es_aeat_mod303
268#: selection:l10n.es.aeat.mod303.report,state:0
269msgid "Canceled"
270msgstr "Cancelado"
271
272#. module: l10n_es_aeat_mod303
273#: field:l10n.es.aeat.mod303.report,regularizacion_anual:0
274msgid "Regularización Anual"
275msgstr "Regularización Anual"
276
277#. module: l10n_es_aeat_mod303
278#: view:l10n.es.aeat.mod303.report:0
279msgid "Ingreso"
280msgstr "Ingreso"
281
282#. module: l10n_es_aeat_mod303
283#: view:l10n.es.aeat.mod303.report:0
284msgid "Calculate"
285msgstr "Calcular"
286
287#. module: l10n_es_aeat_mod303
288#: code:addons/l10n_es_aeat_mod303/wizard/export_mod303_to_boe.py:250
289#, python-format
290msgid "AEAT Model is necessary"
291msgstr "Es necesario el modelo AEAT"
292
293#. module: l10n_es_aeat_mod303
294#: selection:l10n.es.aeat.mod303.report,support_type:0
295msgid "DVD"
296msgstr "DVD"
297
298#. module: l10n_es_aeat_mod303
299#: view:l10n.es.aeat.mod303.report:0
300msgid "In process"
301msgstr "En proceso"
302
303#. module: l10n_es_aeat_mod303
304#: code:addons/l10n_es_aeat_mod303/mod303.py:214
305#, python-format
306msgid "El valor añadido para la regularizacion anual no se ha tendio en cuenta por no ser un periodo de cierre (12 o 4T)"
307msgstr "El valor añadido para la regularizacion anual no se ha tendio en cuenta por no ser un periodo de cierre (12 o 4T)"
308
309#. module: l10n_es_aeat_mod303
310#: view:l10n.es.aeat.mod303.report:0
311#: selection:l10n.es.aeat.mod303.report,state:0
312msgid "Draft"
313msgstr "Borrador"
314
315#. module: l10n_es_aeat_mod303
316#: field:l10n.es.aeat.mod303.report,diferencia:0
317msgid "Diferencia"
318msgstr "Diferencia"
319
320#. module: l10n_es_aeat_mod303
321#: help:l10n.es.aeat.mod303.report,cuota_compensar:0
322msgid "Cuota a compensar de periodos anteriores"
323msgstr "Cuota a compensar de periodos anteriores"
324
325#. module: l10n_es_aeat_mod303
326#: code:addons/l10n_es_aeat_mod303/wizard/export_mod303_to_boe.py:73
327#, python-format
328msgid "The identification (1) and income (2) must be 72 characters long"
329msgstr "The identification (1) and income (2) must be 72 characters long"
330
331#. module: l10n_es_aeat_mod303
332#: field:l10n.es.aeat.mod303.report,sin_actividad:0
333msgid "Sin Actividad"
334msgstr "Sin Actividad"
335
336#. module: l10n_es_aeat_mod303
337#: selection:l10n.es.aeat.mod303.report,period:0
338msgid "August"
339msgstr "Agosto"
340
341#. module: l10n_es_aeat_mod303
342#: selection:l10n.es.aeat.mod303.report,type:0
343msgid "Normal"
344msgstr "Normal"
345
346#. module: l10n_es_aeat_mod303
347#: selection:l10n.es.aeat.mod303.report,state:0
348msgid "Processing"
349msgstr "Procesando"
350
351#. module: l10n_es_aeat_mod303
352#: selection:l10n.es.aeat.mod303.report,period:0
353msgid "June"
354msgstr "Junio"
355
356#. module: l10n_es_aeat_mod303
357#: code:addons/l10n_es_aeat_mod303/wizard/export_mod303_to_boe.py:167
358#, python-format
359msgid "The vat records must be 749 characters long and are %s"
360msgstr "The vat records must be 749 characters long and are %s"
361
362#. module: l10n_es_aeat_mod303
363#: field:l10n.es.aeat.mod303.report,atribuible_estado:0
364msgid "Atribuible a la Administracion"
365msgstr "Atribuible a la Administracion"
366
367#. module: l10n_es_aeat_mod303
368#: selection:l10n.es.aeat.mod303.report,period:0
369msgid "November"
370msgstr "Noviembre"
371
372#. module: l10n_es_aeat_mod303
373#: field:l10n.es.aeat.mod303.report,resultado_liquidacion:0
374msgid "Resultado Liquidación"
375msgstr "Resultado Liquidación"
376
377#. module: l10n_es_aeat_mod303
378#: field:l10n.es.aeat.mod303.report,devolucion_mensual:0
379msgid "Devolución Mensual"
380msgstr "Devolución Mensual"
381
382#. module: l10n_es_aeat_mod303
383#: selection:l10n.es.aeat.mod303.report,period:0
384msgid "January"
385msgstr "Enero"
386
387#. module: l10n_es_aeat_mod303
388#: selection:l10n.es.aeat.mod303.report,state:0
389msgid "Processed"
390msgstr "Procesado"
391
392#. module: l10n_es_aeat_mod303
393#: selection:l10n.es.aeat.mod303.report,period:0
394msgid "Third quarter"
395msgstr "3er Trimestre"
396
397#. module: l10n_es_aeat_mod303
398#: help:l10n.es.aeat.mod303.report,diferencia:0
399msgid "( IVA devengado - IVA deducible )"
400msgstr "( IVA devengado - IVA deducible )"
401
402#. module: l10n_es_aeat_mod303
403#: field:l10n.es.aeat.mod303.report,compensar:0
404msgid "Compensar"
405msgstr "Compensar"
406
407#. module: l10n_es_aeat_mod303
408#: field:l10n.es.aeat.mod303.report,period:0
409msgid "Periodo"
410msgstr "Periodo"
411
412#. module: l10n_es_aeat_mod303
413#: field:l10n.es.aeat.mod303.report,type:0
414msgid "Statement Type"
415msgstr "Tipo de Declaración"
416
417#. module: l10n_es_aeat_mod303
418#: view:l10n.es.aeat.mod303.report:0
419msgid "General"
420msgstr "General"
421
422#. module: l10n_es_aeat_mod303
423#: view:l10n.es.aeat.mod303.report:0
424msgid "In process models"
425msgstr "Modelos en Proceso"
426
427#. module: l10n_es_aeat_mod303
428#: view:l10n.es.aeat.mod303.report:0
429#: selection:l10n.es.aeat.mod303.report,state:0
430msgid "Done"
431msgstr "Realizada"
432
433#. module: l10n_es_aeat_mod303
434#: view:l10n.es.aeat.mod303.report:0
435msgid "Cancel"
436msgstr "Cancelar"
437
438#. module: l10n_es_aeat_mod303
439#: view:l10n.es.aeat.mod303.report:0
440msgid "Recalculate"
441msgstr "Recalcular"
442
443#. module: l10n_es_aeat_mod303
444#: view:l10n.es.aeat.mod303.report:0
445msgid "Importe"
446msgstr "Importe"
447
448#. module: l10n_es_aeat_mod303
449#: selection:l10n.es.aeat.mod303.report,period:0
450msgid "Fourth quarter"
451msgstr "4to Trimestre"
452
453#. module: l10n_es_aeat_mod303
454#: view:l10n.es.aeat.mod303.report:0
455msgid "Compensación"
456msgstr "Compensación"
457
458#. module: l10n_es_aeat_mod303
459#: selection:l10n.es.aeat.mod303.report,period:0
460msgid "October"
461msgstr "Octubre"
462
463#. module: l10n_es_aeat_mod303
464#: field:l10n.es.aeat.mod303.report,porcentaje_atribuible_estado:0
465msgid "%"
466msgstr "%"
467
468#. module: l10n_es_aeat_mod303
469#: selection:l10n.es.aeat.mod303.report,type:0
470msgid "Complementary"
471msgstr "Complementary"
472
473#. module: l10n_es_aeat_mod303
474#: selection:l10n.es.aeat.mod303.report,period:0
475msgid "May"
476msgstr "Mayo"
477
478#. module: l10n_es_aeat_mod303
479#: field:l10n.es.aeat.mod303.report,cuenta_ingreso_id:0
480msgid "CCC Ingreso"
481msgstr "CCC Ingreso"
482
483#. module: l10n_es_aeat_mod303
484#: help:l10n.es.aeat.mod303.report,representative_vat:0
485msgid "Legal Representative VAT number."
486msgstr "Legal Representative VAT number."
487
488#. module: l10n_es_aeat_mod303
489#: field:l10n.es.aeat.mod303.report,previous_number:0
490msgid "Previous Declaration Number"
491msgstr "Número Declaración anterior"
492
493#. module: l10n_es_aeat_mod303
494#: selection:l10n.es.aeat.mod303.report,period:0
495msgid "February"
496msgstr "Febrero"
497
498#. module: l10n_es_aeat_mod303
499#: view:l10n.es.aeat.mod303.report:0
500msgid "Complementaria"
501msgstr "Complementaria"
502
503#. module: l10n_es_aeat_mod303
504#: view:l10n.es.aeat.mod303.report:0
505#: field:l10n.es.aeat.mod303.report,resultado_casilla_46:0
506msgid "Resultado"
507msgstr "Resultado"
508
509#. module: l10n_es_aeat_mod303
510#: field:l10n.es.aeat.mod303.report,total_devengado:0
511msgid "IVA Devengado"
512msgstr "IVA Devengado"
513
514#. module: l10n_es_aeat_mod303
515#: selection:l10n.es.aeat.mod303.report,period:0
516msgid "April"
517msgstr "Abril"
518
519#. module: l10n_es_aeat_mod303
520#: view:l10n.es.aeat.mod303.report:0
521#: field:l10n.es.aeat.mod303.report,fiscalyear_id:0
522msgid "Fiscal Year"
523msgstr "Año Fiscal"
524
525#. module: l10n_es_aeat_mod303
526#: field:l10n.es.aeat.mod303.report,cuenta_devolucion_id:0
527msgid "CCC Devolución"
528msgstr "CCC Devolución"
529
530#. module: l10n_es_aeat_mod303
531#: selection:l10n.es.aeat.mod303.report,support_type:0
532msgid "Telematics"
533msgstr "Telematics"
534
535#. module: l10n_es_aeat_mod303
536#: model:ir.model,name:l10n_es_aeat_mod303.model_l10n_es_aeat_mod303_export_to_boe
537msgid "Export AEAT Model 303 to BOE format"
538msgstr "Exportar el modelo AEAT 303 a formato BOE"
539
540#. module: l10n_es_aeat_mod303
541#: code:addons/l10n_es_aeat_mod303/wizard/export_mod303_to_boe.py:204
542#, python-format
543msgid "CCC de ingreso no válido %s"
544msgstr "CCC de ingreso no válido %s"
545
546#. module: l10n_es_aeat_mod303
547#: selection:l10n.es.aeat.mod303.report,period:0
548msgid "Second quarter"
549msgstr "2do Trimestre"
550
551#. module: l10n_es_aeat_mod303
552#: code:addons/l10n_es_aeat_mod303/wizard/export_mod303_to_boe.py:274
553#, python-format
554msgid "%s_report_%s.txt"
555msgstr "%s_report_%s.txt"
0556
=== added file 'l10n_es_aeat_mod303/i18n/l10n_es_aeat_mod303.pot'
--- l10n_es_aeat_mod303/i18n/l10n_es_aeat_mod303.pot 1970-01-01 00:00:00 +0000
+++ l10n_es_aeat_mod303/i18n/l10n_es_aeat_mod303.pot 2013-10-10 17:06:51 +0000
@@ -0,0 +1,535 @@
1# Translation of OpenERP Server.
2# This file contains the translation of the following modules:
3# * l10n_es_aeat_mod303
4#
5msgid ""
6msgstr ""
7"Project-Id-Version: OpenERP Server 6.0.3\n"
8"Report-Msgid-Bugs-To: support@openerp.com\n"
9"POT-Creation-Date: 2013-10-10 17:03+0000\n"
10"PO-Revision-Date: 2013-10-10 17:03+0000\n"
11"Last-Translator: <>\n"
12"Language-Team: \n"
13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"
15"Content-Transfer-Encoding: \n"
16"Plural-Forms: \n"
17
18#. module: l10n_es_aeat_mod303
19#: code:addons/l10n_es_aeat_mod303/wizard/export_mod303_to_boe.py:266
20#, python-format
21msgid "The 303 report must be 1353 characters long and are %s"
22msgstr ""
23
24#. module: l10n_es_aeat_mod303
25#: view:l10n.es.aeat.mod303.report:0
26msgid "AEAT 303 Reports"
27msgstr ""
28
29#. module: l10n_es_aeat_mod303
30#: field:l10n.es.aeat.mod303.report,representative_vat:0
31msgid "L.R. VAT number"
32msgstr ""
33
34#. module: l10n_es_aeat_mod303
35#: view:l10n.es.aeat.mod303.report:0
36msgid "Devolución"
37msgstr ""
38
39#. module: l10n_es_aeat_mod303
40#: model:ir.model,name:l10n_es_aeat_mod303.model_l10n_es_aeat_mod303_report
41#: view:l10n.es.aeat.mod303.report:0
42msgid "AEAT 303 Report"
43msgstr ""
44
45#. module: l10n_es_aeat_mod303
46#: selection:l10n.es.aeat.mod303.report,period:0
47msgid "March"
48msgstr ""
49
50#. module: l10n_es_aeat_mod303
51#: view:l10n.es.aeat.mod303.report:0
52#: field:l10n.es.aeat.mod303.report,company_id:0
53msgid "Company"
54msgstr ""
55
56#. module: l10n_es_aeat_mod303
57#: field:l10n.es.aeat.mod303.report,devolver:0
58msgid "Devolver"
59msgstr ""
60
61#. module: l10n_es_aeat_mod303
62#: code:addons/l10n_es_aeat_mod303/mod303.py:225
63#, python-format
64msgid "Seleccione una cuenta para ingresar el importe"
65msgstr ""
66
67#. module: l10n_es_aeat_mod303
68#: selection:l10n.es.aeat.mod303.report,type:0
69msgid "Substitutive"
70msgstr ""
71
72#. module: l10n_es_aeat_mod303
73#: help:l10n.es.aeat.mod303.report,regularizacion_anual:0
74msgid "En la última autoliquidación del año (la del período 4T o mes 12) se hará constar, con el signo que corresponda, el resultado de la regularización anual conforme disponen las Leyes por las que se aprueban el Concierto Económico entre el Estado y la Comunidad Autónoma del País Vasco y el Convenio Económico entre el Estado y la Comunidad Foral de Navarra."
75msgstr ""
76
77#. module: l10n_es_aeat_mod303
78#: model:ir.actions.act_window,help:l10n_es_aeat_mod303.action_l10n_es_aeat_mod303_report
79msgid "Create and query AEAT Model 303 Reports"
80msgstr ""
81
82#. module: l10n_es_aeat_mod303
83#: field:l10n.es.aeat.mod303.report,cuota_compensar:0
84msgid "Cuotas a Compensar"
85msgstr ""
86
87#. module: l10n_es_aeat_mod303
88#: code:addons/l10n_es_aeat_mod303/mod303.py:153
89#, python-format
90msgid "El periodo seleccionado no coincide con los periodos del año fiscal:"
91msgstr ""
92
93#. module: l10n_es_aeat_mod303
94#: view:l10n.es.aeat.mod303.report:0
95msgid "Cancelled"
96msgstr ""
97
98#. module: l10n_es_aeat_mod303
99#: field:l10n.es.aeat.mod303.report,complementaria:0
100#: help:l10n.es.aeat.mod303.report,complementaria:0
101msgid "Autoliquidación Complementaria"
102msgstr ""
103
104#. module: l10n_es_aeat_mod303
105#: field:l10n.es.aeat.mod303.report,company_vat:0
106msgid "VAT number"
107msgstr ""
108
109#. module: l10n_es_aeat_mod303
110#: help:l10n.es.aeat.mod303.report,resultado_casilla_46:0
111msgid "Atribuible a la admistracion [40] - Cuotas a compensar [41] + Regularización Anual [45]"
112msgstr ""
113
114#. module: l10n_es_aeat_mod303
115#: field:l10n.es.aeat.mod303.report,previus_result:0
116msgid "A Deducir"
117msgstr ""
118
119#. module: l10n_es_aeat_mod303
120#: code:addons/l10n_es_aeat_mod303/wizard/export_mod303_to_boe.py:181
121#: code:addons/l10n_es_aeat_mod303/wizard/export_mod303_to_boe.py:203
122#, python-format
123msgid "Warning"
124msgstr ""
125
126#. module: l10n_es_aeat_mod303
127#: help:l10n.es.aeat.mod303.report,previus_result:0
128msgid "Resultado de la anterior o anteriores del mismo concepto, ejercicio y periodo"
129msgstr ""
130
131#. module: l10n_es_aeat_mod303
132#: view:l10n.es.aeat.mod303.report:0
133msgid "Confirm"
134msgstr ""
135
136#. module: l10n_es_aeat_mod303
137#: help:l10n.es.aeat.mod303.report,porcentaje_atribuible_estado:0
138msgid "Los sujetos pasivos que tributen conjuntamente a la Administración del Estado y a las Diputaciones Forales del País Vasco o a la ComunidadForal de Navarra, consignarán en esta casilla el porcentaje del volumen de operaciones en territorio común. Los demás sujetos pasivos consignarán en esta casilla el 100%"
139msgstr ""
140
141#. module: l10n_es_aeat_mod303
142#: selection:l10n.es.aeat.mod303.report,period:0
143msgid "February"
144msgstr ""
145
146#. module: l10n_es_aeat_mod303
147#: field:l10n.es.aeat.mod303.report,state:0
148msgid "State"
149msgstr ""
150
151#. module: l10n_es_aeat_mod303
152#: selection:l10n.es.aeat.mod303.report,period:0
153msgid "First quarter"
154msgstr ""
155
156#. module: l10n_es_aeat_mod303
157#: model:ir.actions.act_window,name:l10n_es_aeat_mod303.action_l10n_es_aeat_mod303_report
158msgid "AEAT Model 303"
159msgstr ""
160
161#. module: l10n_es_aeat_mod303
162#: view:l10n.es.aeat.mod303.report:0
163msgid "AEAT 303"
164msgstr ""
165
166#. module: l10n_es_aeat_mod303
167#: code:addons/l10n_es_aeat_mod303/mod303.py:229
168#, python-format
169msgid "No hay actividad en el periodo seleccionado, marque la casilla correspondinte"
170msgstr ""
171
172#. module: l10n_es_aeat_mod303
173#: model:ir.ui.menu,name:l10n_es_aeat_mod303.menu_aeat_mod303_report
174msgid "AEAT 303 Model"
175msgstr ""
176
177#. module: l10n_es_aeat_mod303
178#: field:l10n.es.aeat.mod303.report,support_type:0
179msgid "Support Type"
180msgstr ""
181
182#. module: l10n_es_aeat_mod303
183#: code:addons/l10n_es_aeat_mod303/wizard/export_mod303_to_boe.py:273
184#, python-format
185msgid "%Y-%m-%d"
186msgstr ""
187
188#. module: l10n_es_aeat_mod303
189#: view:l10n.es.aeat.mod303.report:0
190msgid "Export to BOE"
191msgstr ""
192
193#. module: l10n_es_aeat_mod303
194#: selection:l10n.es.aeat.mod303.report,period:0
195msgid "July"
196msgstr ""
197
198#. module: l10n_es_aeat_mod303
199#: code:addons/l10n_es_aeat_mod303/mod303.py:227
200#, python-format
201msgid "Seleccione una cuenta para realizar la devolución"
202msgstr ""
203
204#. module: l10n_es_aeat_mod303
205#: help:l10n.es.aeat.mod303.report,devolucion_mensual:0
206msgid "Inscrito en el Registro de Devolución Mensual"
207msgstr ""
208
209#. module: l10n_es_aeat_mod303
210#: code:addons/l10n_es_aeat_mod303/wizard/export_mod303_to_boe.py:181
211#, python-format
212msgid "CCC de devolución no válida \n"
213"%s"
214msgstr ""
215
216#. module: l10n_es_aeat_mod303
217#: field:l10n.es.aeat.mod303.report,calculation_date:0
218msgid "Calculation date"
219msgstr ""
220
221#. module: l10n_es_aeat_mod303
222#: field:l10n.es.aeat.mod303.report,contact_name:0
223msgid "Full Name"
224msgstr ""
225
226#. module: l10n_es_aeat_mod303
227#: view:l10n.es.aeat.mod303.report:0
228msgid "Declaracion"
229msgstr ""
230
231#. module: l10n_es_aeat_mod303
232#: field:l10n.es.aeat.mod303.report,ingresar:0
233msgid "Ingresar"
234msgstr ""
235
236#. module: l10n_es_aeat_mod303
237#: selection:l10n.es.aeat.mod303.report,period:0
238msgid "September"
239msgstr ""
240
241#. module: l10n_es_aeat_mod303
242#: selection:l10n.es.aeat.mod303.report,period:0
243msgid "December"
244msgstr ""
245
246#. module: l10n_es_aeat_mod303
247#: field:l10n.es.aeat.mod303.report,number:0
248msgid "Declaration Number"
249msgstr ""
250
251#. module: l10n_es_aeat_mod303
252#: field:l10n.es.aeat.mod303.report,total_deducir:0
253msgid "IVA a Deducir"
254msgstr ""
255
256#. module: l10n_es_aeat_mod303
257#: selection:l10n.es.aeat.mod303.report,state:0
258msgid "Canceled"
259msgstr ""
260
261#. module: l10n_es_aeat_mod303
262#: field:l10n.es.aeat.mod303.report,regularizacion_anual:0
263msgid "Regularización Anual"
264msgstr ""
265
266#. module: l10n_es_aeat_mod303
267#: view:l10n.es.aeat.mod303.report:0
268msgid "Ingreso"
269msgstr ""
270
271#. module: l10n_es_aeat_mod303
272#: view:l10n.es.aeat.mod303.report:0
273msgid "Calculate"
274msgstr ""
275
276#. module: l10n_es_aeat_mod303
277#: code:addons/l10n_es_aeat_mod303/wizard/export_mod303_to_boe.py:249
278#, python-format
279msgid "AEAT Model is necessary"
280msgstr ""
281
282#. module: l10n_es_aeat_mod303
283#: selection:l10n.es.aeat.mod303.report,support_type:0
284msgid "DVD"
285msgstr ""
286
287#. module: l10n_es_aeat_mod303
288#: view:l10n.es.aeat.mod303.report:0
289msgid "In process"
290msgstr ""
291
292#. module: l10n_es_aeat_mod303
293#: code:addons/l10n_es_aeat_mod303/mod303.py:212
294#, python-format
295msgid "El valor añadido para la regularizacion anual no se ha tendio en cuenta por no ser un periodo de cierre (12 o 4T)"
296msgstr ""
297
298#. module: l10n_es_aeat_mod303
299#: view:l10n.es.aeat.mod303.report:0
300#: selection:l10n.es.aeat.mod303.report,state:0
301msgid "Draft"
302msgstr ""
303
304#. module: l10n_es_aeat_mod303
305#: field:l10n.es.aeat.mod303.report,diferencia:0
306msgid "Diferencia"
307msgstr ""
308
309#. module: l10n_es_aeat_mod303
310#: help:l10n.es.aeat.mod303.report,cuota_compensar:0
311msgid "Cuota a compensar de periodos anteriores"
312msgstr ""
313
314#. module: l10n_es_aeat_mod303
315#: code:addons/l10n_es_aeat_mod303/wizard/export_mod303_to_boe.py:74
316#, python-format
317msgid "The identification (1) and income (2) must be 72 characters long"
318msgstr ""
319
320#. module: l10n_es_aeat_mod303
321#: field:l10n.es.aeat.mod303.report,sin_actividad:0
322msgid "Sin Actividad"
323msgstr ""
324
325#. module: l10n_es_aeat_mod303
326#: selection:l10n.es.aeat.mod303.report,period:0
327msgid "August"
328msgstr ""
329
330#. module: l10n_es_aeat_mod303
331#: selection:l10n.es.aeat.mod303.report,type:0
332msgid "Normal"
333msgstr ""
334
335#. module: l10n_es_aeat_mod303
336#: selection:l10n.es.aeat.mod303.report,state:0
337msgid "Processing"
338msgstr ""
339
340#. module: l10n_es_aeat_mod303
341#: selection:l10n.es.aeat.mod303.report,period:0
342msgid "June"
343msgstr ""
344
345#. module: l10n_es_aeat_mod303
346#: code:addons/l10n_es_aeat_mod303/wizard/export_mod303_to_boe.py:166
347#, python-format
348msgid "The vat records must be 749 characters long and are %s"
349msgstr ""
350
351#. module: l10n_es_aeat_mod303
352#: field:l10n.es.aeat.mod303.report,atribuible_estado:0
353msgid "Atribuible a la Administracion"
354msgstr ""
355
356#. module: l10n_es_aeat_mod303
357#: selection:l10n.es.aeat.mod303.report,period:0
358msgid "November"
359msgstr ""
360
361#. module: l10n_es_aeat_mod303
362#: field:l10n.es.aeat.mod303.report,resultado_liquidacion:0
363msgid "Resultado Liquidación"
364msgstr ""
365
366#. module: l10n_es_aeat_mod303
367#: field:l10n.es.aeat.mod303.report,devolucion_mensual:0
368msgid "Devolución Mensual"
369msgstr ""
370
371#. module: l10n_es_aeat_mod303
372#: selection:l10n.es.aeat.mod303.report,period:0
373msgid "January"
374msgstr ""
375
376#. module: l10n_es_aeat_mod303
377#: selection:l10n.es.aeat.mod303.report,state:0
378msgid "Processed"
379msgstr ""
380
381#. module: l10n_es_aeat_mod303
382#: selection:l10n.es.aeat.mod303.report,period:0
383msgid "Third quarter"
384msgstr ""
385
386#. module: l10n_es_aeat_mod303
387#: help:l10n.es.aeat.mod303.report,diferencia:0
388msgid "( IVA devengado - IVA deducible )"
389msgstr ""
390
391#. module: l10n_es_aeat_mod303
392#: field:l10n.es.aeat.mod303.report,compensar:0
393msgid "Compensar"
394msgstr ""
395
396#. module: l10n_es_aeat_mod303
397#: field:l10n.es.aeat.mod303.report,period:0
398msgid "Periodo"
399msgstr ""
400
401#. module: l10n_es_aeat_mod303
402#: field:l10n.es.aeat.mod303.report,type:0
403msgid "Statement Type"
404msgstr ""
405
406#. module: l10n_es_aeat_mod303
407#: view:l10n.es.aeat.mod303.report:0
408msgid "General"
409msgstr ""
410
411#. module: l10n_es_aeat_mod303
412#: view:l10n.es.aeat.mod303.report:0
413#: selection:l10n.es.aeat.mod303.report,state:0
414msgid "Done"
415msgstr ""
416
417#. module: l10n_es_aeat_mod303
418#: view:l10n.es.aeat.mod303.report:0
419msgid "Cancel"
420msgstr ""
421
422#. module: l10n_es_aeat_mod303
423#: view:l10n.es.aeat.mod303.report:0
424msgid "Recalculate"
425msgstr ""
426
427#. module: l10n_es_aeat_mod303
428#: view:l10n.es.aeat.mod303.report:0
429msgid "Importe"
430msgstr ""
431
432#. module: l10n_es_aeat_mod303
433#: selection:l10n.es.aeat.mod303.report,period:0
434msgid "Fourth quarter"
435msgstr ""
436
437#. module: l10n_es_aeat_mod303
438#: view:l10n.es.aeat.mod303.report:0
439msgid "Compensación"
440msgstr ""
441
442#. module: l10n_es_aeat_mod303
443#: selection:l10n.es.aeat.mod303.report,period:0
444msgid "October"
445msgstr ""
446
447#. module: l10n_es_aeat_mod303
448#: field:l10n.es.aeat.mod303.report,porcentaje_atribuible_estado:0
449msgid "%"
450msgstr ""
451
452#. module: l10n_es_aeat_mod303
453#: selection:l10n.es.aeat.mod303.report,type:0
454msgid "Complementary"
455msgstr ""
456
457#. module: l10n_es_aeat_mod303
458#: selection:l10n.es.aeat.mod303.report,period:0
459msgid "May"
460msgstr ""
461
462#. module: l10n_es_aeat_mod303
463#: field:l10n.es.aeat.mod303.report,cuenta_ingreso_id:0
464msgid "CCC Ingreso"
465msgstr ""
466
467#. module: l10n_es_aeat_mod303
468#: help:l10n.es.aeat.mod303.report,representative_vat:0
469msgid "Legal Representative VAT number."
470msgstr ""
471
472#. module: l10n_es_aeat_mod303
473#: field:l10n.es.aeat.mod303.report,previous_number:0
474msgid "Previous Declaration Number"
475msgstr ""
476
477#. module: l10n_es_aeat_mod303
478#: view:l10n.es.aeat.mod303.report:0
479msgid "Complementaria"
480msgstr ""
481
482#. module: l10n_es_aeat_mod303
483#: view:l10n.es.aeat.mod303.report:0
484#: field:l10n.es.aeat.mod303.report,resultado_casilla_46:0
485msgid "Resultado"
486msgstr ""
487
488#. module: l10n_es_aeat_mod303
489#: field:l10n.es.aeat.mod303.report,total_devengado:0
490msgid "IVA Devengado"
491msgstr ""
492
493#. module: l10n_es_aeat_mod303
494#: selection:l10n.es.aeat.mod303.report,period:0
495msgid "April"
496msgstr ""
497
498#. module: l10n_es_aeat_mod303
499#: view:l10n.es.aeat.mod303.report:0
500#: field:l10n.es.aeat.mod303.report,fiscalyear_id:0
501msgid "Fiscal Year"
502msgstr ""
503
504#. module: l10n_es_aeat_mod303
505#: field:l10n.es.aeat.mod303.report,cuenta_devolucion_id:0
506msgid "CCC Devolución"
507msgstr ""
508
509#. module: l10n_es_aeat_mod303
510#: selection:l10n.es.aeat.mod303.report,support_type:0
511msgid "Telematics"
512msgstr ""
513
514#. module: l10n_es_aeat_mod303
515#: model:ir.model,name:l10n_es_aeat_mod303.model_l10n_es_aeat_mod303_export_to_boe
516msgid "Export AEAT Model 303 to BOE format"
517msgstr ""
518
519#. module: l10n_es_aeat_mod303
520#: code:addons/l10n_es_aeat_mod303/wizard/export_mod303_to_boe.py:203
521#, python-format
522msgid "CCC de ingreso no válido %s"
523msgstr ""
524
525#. module: l10n_es_aeat_mod303
526#: selection:l10n.es.aeat.mod303.report,period:0
527msgid "Second quarter"
528msgstr ""
529
530#. module: l10n_es_aeat_mod303
531#: code:addons/l10n_es_aeat_mod303/wizard/export_mod303_to_boe.py:273
532#, python-format
533msgid "%s_report_%s.txt"
534msgstr ""
535
0536
=== added file 'l10n_es_aeat_mod303/mod303.py'
--- l10n_es_aeat_mod303/mod303.py 1970-01-01 00:00:00 +0000
+++ l10n_es_aeat_mod303/mod303.py 2013-10-10 17:06:51 +0000
@@ -0,0 +1,245 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2013 Guadaltech. All Rights Reserved
6# Author: Alberto Martín Cortada
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program. If not, see http://www.gnu.org/licenses/.
20#
21##############################################################################
22
23
24import re
25import time
26from datetime import datetime
27from dateutil.relativedelta import relativedelta
28
29
30from osv import osv, fields
31from tools.translate import _
32from account.report.account_tax_report import tax_report
33
34
35class l10n_es_aeat_mod303_report(osv.osv):
36
37 _inherit = "l10n.es.aeat.report"
38 _name = "l10n.es.aeat.mod303.report"
39 _description = "AEAT 303 Report"
40 _rec_name = "number"
41
42 def button_calculate(self, cr, uid, ids, context=None):
43 if not context:
44 context = {}
45
46 self.action_confirm(cr, uid, ids, context)
47
48 return True
49
50 def button_recalculate(self, cr, uid, ids, context=None):
51 if context is None:
52 context = {}
53
54 self.action_confirm(cr, uid, ids, context)
55
56 return True
57
58 def button_export(self, cr, uid, ids, context=None):
59 if context is None:
60 context = {}
61
62 export_obj = self.pool.get("l10n.es.aeat.mod303.export_to_boe")
63 export_obj._export_boe_file(cr, uid, ids, self.browse(cr, uid, ids and ids[0]),'303')
64
65 return True
66
67
68 _columns = {
69
70 'period': fields.selection([
71 ('1T','First quarter'),('2T','Second quarter'),('3T','Third quarter'),
72 ('4T','Fourth quarter'),('01','January'),('02','February'),('03','March'),('04','April'),
73 ('05','May'),('06','June'),('07','July'),('08','August'),('09','September'),('10','October'),
74 ('11','November'),('12','December')
75 ], 'Periodo',states={'done':[('readonly',True)]}),
76 'devolucion_mensual' : fields.boolean("Devolución Mensual",help="Inscrito en el Registro de Devolución Mensual",states={'done':[('readonly',True)]}),
77 'complementaria' : fields.boolean("Autoliquidación Complementaria",help="Autoliquidación Complementaria",states={'done':[('readonly',True)]}),
78 'contact_name': fields.char("Full Name", size=40),
79 'total_devengado' : fields.float("IVA Devengado",readonly=True), ## 21
80 'total_deducir' : fields.float("IVA a Deducir",readonly=True), ## 37
81 'diferencia' : fields.float("Diferencia",readonly=True,help="( IVA devengado - IVA deducible )"), ## 38
82 'porcentaje_atribuible_estado' : fields.float("%", help="""Los sujetos pasivos que tributen conjuntamente a la Administración del Estado y a las Diputaciones Forales del País Vasco o a la ComunidadForal de Navarra, consignarán en esta casilla el porcentaje del volumen de operaciones en territorio común. Los demás sujetos pasivos consignarán en esta casilla el 100%""",states={'done':[('readonly',True)]}), ## 39
83 'atribuible_estado' : fields.float("Atribuible a la Administracion",readonly=True), ## 40
84 'cuota_compensar' : fields.float("Cuotas a Compensar",help="Cuota a compensar de periodos anteriores",states={'done':[('readonly',True)]}), ## 41
85 'regularizacion_anual' : fields.float("Regularización Anual",help="""En la última autoliquidación del año (la del período 4T o mes 12) se hará constar, con el signo que corresponda, el resultado de la regularización anual conforme disponen las Leyes por las que se aprueban el Concierto Económico entre el Estado y la Comunidad Autónoma del País Vasco y el Convenio Económico entre el Estado y la Comunidad Foral de Navarra.""",states={'done':[('readonly',True)]}), ## 45
86 'resultado_casilla_46' : fields.float("Resultado",help="""Atribuible a la admistracion [40] - Cuotas a compensar [41] + Regularización Anual [45]""",readonly=True), ## 46
87
88 'previus_result' : fields.float("A Deducir",help="Resultado de la anterior o anteriores del mismo concepto, ejercicio y periodo",states={'done':[('readonly',True)]}), ## 47
89 'resultado_liquidacion' : fields.float("Resultado Liquidación",readonly=True), ## 48
90
91 'compensar' : fields.float("Compensar",states={'done':[('readonly',True)]}), ## 49
92
93 "devolver" : fields.float("Devolver",states={'done':[('readonly',True)]}),
94 "ingresar" : fields.float("Ingresar",states={'done':[('readonly',True)]}),
95
96 'cuenta_devolucion_id' : fields.many2one("res.partner.bank","CCC Devolución",states={'done':[('readonly',True)]}),
97 'cuenta_ingreso_id' : fields.many2one("res.partner.bank","CCC Ingreso",states={'done':[('readonly',True)]}),
98
99 'sin_actividad' : fields.boolean("Sin Actividad",states={'done':[('readonly',True)]}),
100
101
102# 'type': fields.selection([
103# ('C','Solicitud de compensación'),
104# ('D','Devolución'),
105# ('G','CC Tributaria-Ingreso'),
106# ('I','Ingreso'),
107# ('N','Sin Actividad'),
108# ('V','CC Tributaria-Devolución'),
109# ('U','Domicilación de CCC'),], 'Statement Type',
110# required=True),
111
112 }
113 _defaults = {
114 'number' : lambda *a: '303',
115 'porcentaje_atribuible_estado': lambda *a: 100,
116 'cuota_compensar' : lambda *a: 0
117 }
118
119
120 def _get_period(self,cr,uid,ids,context=None):
121
122 period_obj = self.pool.get("account.period")
123 quarter_dict = {"1T" : 'first',
124 "2T" : 'second',
125 "3T" : 'third',
126 "4T" : 'fourth',
127 }
128 account_period_id = []
129
130 for mod303 in self.browse(cr, uid, ids, context):
131
132 fecha_ini = False
133 fecha_fin = False
134
135 dec_year = mod303.fiscalyear_id.date_start.split('-')[0]
136
137 mod = mod303.period
138
139 if mod >= '01' and mod <= '12':
140 fecha_ini = datetime.strptime('%s-%s-01' % (dec_year, mod), '%Y-%m-%d')
141 fecha_fin = fecha_ini + relativedelta(months=+1, days=-1)
142 account_period_id = period_obj.search(cr,uid,[('date_start','=',fecha_ini),('date_stop','=',fecha_fin)])
143
144 if mod in ('1T', '2T', '3T', '4T'):
145 month = ( ( int(mod[0])-1 ) * 3 ) + 1
146 fecha_ini = datetime.strptime('%s-%s-01' % (dec_year, month), '%Y-%m-%d')
147 fecha_fin = fecha_ini + relativedelta(months=+3, days=-1)
148
149 account_period_id = period_obj.search(cr,uid,[('date_start','=',fecha_ini),('date_stop','=',fecha_fin)])
150 if not account_period_id:
151 account_period_id = period_obj.search(cr,uid,[('quarter','=',quarter_dict[mod])])
152 if not account_period_id:
153 raise osv.except_osv(_('El periodo seleccionado no coincide con los periodos del año fiscal:'), dec_year)
154
155 return account_period_id
156
157
158 def _get_report_lines(self, cr, uid, ids, context=None):
159 """get report lines"""
160
161
162 dict_code_values = {}
163 for i in range(1,51):
164 dict_code_values["[%.2d]" % i] = 0
165
166 for mod303 in self.browse(cr, uid, ids, context):
167
168 generate_line = tax_report(cr,uid,"account.vat.declaration")
169 generate_line.period_ids = self._get_period(cr,uid,[mod303.id],context)
170 generate_line.display_detail = False
171 lines = generate_line._get_lines( 'invoices', mod303.company_id.id)
172
173 ordered_lines = sorted(lines, key=lambda k: k['code'])
174
175
176 for code in dict_code_values.keys():
177 for line in ordered_lines:
178 if code == line["code"]:
179 dict_code_values[code] += line["tax_amount"]
180
181 return dict_code_values
182
183
184
185
186 def action_confirm(self, cr, uid, ids, context=None):
187 """set to done the report and check its records"""
188 if context is None: context = {}
189 for mod303 in self.browse(cr, uid, ids, context):
190 report_lines = self._get_report_lines(cr, uid, ids, context)
191 regularizacion_anual = mod303.regularizacion_anual if ( mod303.period == "4T" or mod303.period == "12" ) else 0
192 total_devengado = report_lines.get("[21]")
193 total_deducir = report_lines.get("[37]")
194 atribuible_estado = (total_devengado - total_deducir) * mod303.porcentaje_atribuible_estado / 100 ## casilla 40
195 casilla_46 = atribuible_estado - mod303.cuota_compensar + regularizacion_anual
196 previus_result = mod303.previus_result if mod303.complementaria else 0
197 resultado_liquidacion = casilla_46 - previus_result
198 vals = {
199 'state': 'calculated',
200 'calculation_date':time.strftime('%Y-%m-%d'),
201 'total_devengado':total_devengado,
202 'total_deducir':total_deducir,
203 'diferencia': total_devengado - total_deducir,
204 'atribuible_estado' : atribuible_estado,
205 'resultado_casilla_46' : casilla_46,
206 'resultado_liquidacion' : resultado_liquidacion,
207 'compensar' : abs(resultado_liquidacion) if resultado_liquidacion < 0 and mod303.devolver == 0 else 0,
208 'ingresar' : resultado_liquidacion if resultado_liquidacion > 0 else 0
209 }
210
211 if mod303.regularizacion_anual > 0 and not ( mod303.period == "4T" and mod303.period == "12" ):
212 self.log(cr,uid,mod303.id,_("El valor añadido para la regularizacion anual no se ha tendio en cuenta por no ser un periodo de cierre (12 o 4T)"),context)
213
214 self.write(cr, uid, mod303.id, vals)
215
216 return True
217
218 def confirm(self, cr, uid, ids, context=None):
219 """set to done the report and check its records"""
220
221 msg_validation = ""
222 for mod303 in self.browse(cr,uid,ids,context):
223
224 if mod303.ingresar > 0 and not mod303.cuenta_ingreso_id:
225 msg_validation = _('Seleccione una cuenta para ingresar el importe')
226 if mod303.devolver > 0 and not mod303.cuenta_devolucion_id:
227 msg_validation = _('Seleccione una cuenta para realizar la devolución')
228 if mod303.resultado_liquidacion == 0 and not mod303.sin_actividad:
229 msg_validation = _("No hay actividad en el periodo seleccionado, marque la casilla correspondinte")
230
231
232 if msg_validation:
233 raise osv.except_osv("",msg_validation)
234
235 self.write(cr, uid, ids, {'state': 'done'})
236
237 return True
238
239 def cancel(self, cr, uid, ids, context=None):
240 """set to done the report and check its records"""
241 self.write(cr, uid, ids, {'state': 'canceled'})
242
243 return True
244
245l10n_es_aeat_mod303_report()
0246
=== added file 'l10n_es_aeat_mod303/mod303_view.xml'
--- l10n_es_aeat_mod303/mod303_view.xml 1970-01-01 00:00:00 +0000
+++ l10n_es_aeat_mod303/mod303_view.xml 2013-10-10 17:06:51 +0000
@@ -0,0 +1,164 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4
5
6 ######################
7 ### AEAT MODEL 303 ###
8 ######################
9
10 <!-- Tree view -->
11 <record id="view_l10n_es_aeat_mod303_report_tree" model="ir.ui.view">
12 <field name="name">AEAT Model 303 (tree)</field>
13 <field name="model">l10n.es.aeat.mod303.report</field>
14 <field name="type">tree</field>
15 <field name="arch" type="xml">
16 <tree string="AEAT 303 Reports">
17 <field name="number"/>
18 <field name="company_id"/>
19 <field name="fiscalyear_id"/>
20 <field name="period" />
21 <field name="state" />
22 <!-- <field name="type"/> -->
23 <!-- <field name="previous_number"/> -->
24 <!-- <field name="support_type"/> -->
25 </tree>
26 </field>
27 </record>
28
29 <!-- Form view -->
30 <record id="view_l10n_es_aeat_mod303_report_form" model="ir.ui.view">
31 <field name="name">AEAT Model 303 (form)</field>
32 <field name="model">l10n.es.aeat.mod303.report</field>
33 <field name="type">form</field>
34 <field name="arch" type="xml">
35 <form string="AEAT 303 Report" >
36
37 <group string="Declaracion" colspan="4" >
38 <field name="company_id" on_change="on_change_company_id(company_id)" required="1" select="1"/>
39 <field name="company_vat" required="1"/>
40 <field name="fiscalyear_id" select="1"/>
41 <field name="period" required="True"/>
42 <!-- <field name="type" selection="1"/> -->
43 <group colspan="6" col="6">
44 <field name="devolucion_mensual" />
45 <field name="complementaria" />
46 <field name="sin_actividad" />
47 </group>
48 </group>
49 <notebook>
50 <page string ="General">
51 <group string="Complementaria" attrs="{'invisible':[('complementaria','=',False)]}" colspan="4">
52 <field name="previus_result" attrs="{'required':[('complementaria','=',True)]}" />
53 <field name="previous_number" attrs="{'required':[('complementaria','=',True)]}"/>
54 </group>
55 <group string="Resultado" colspan="4" col="4">
56 <group colspan="6" col="6">
57 <field name="total_devengado"/>
58 <field name="total_deducir" />
59 <field name="diferencia" />
60 <group colspan="2" ></group>
61 <field name="porcentaje_atribuible_estado" />
62 <field name="atribuible_estado"/>
63 <field name="cuota_compensar" />
64 <field name="regularizacion_anual" />
65 <field name="resultado_casilla_46" />
66 <group colspan="4" ></group>
67 <field name="resultado_liquidacion" />
68 </group>
69 </group>
70 <group attrs="{'invisible':[('resultado_liquidacion','=',0)]}">
71 <group colspan="6" col="6" attrs="{'invisible':['|',('resultado_liquidacion','&gt;',0),('state','=','draft')]}" >
72 <group colspan="2" string="Compensación">
73 <field name="compensar" string="Importe"></field>
74 </group>
75 <group string="Devolución" >
76
77 <field name="devolver" colspan="2" string="Importe"/>
78 <field name="cuenta_devolucion_id" colspan="2"
79 attrs="{'required':[('devolver','&gt;',0)]}"/>
80 </group>
81 </group>
82 <group string="Ingreso" attrs="{'invisible':['|',('resultado_liquidacion','&lt;',0),('state','=','draft')]}">
83 <field name="ingresar" colspan="2" string="Importe"/>
84 <field name="cuenta_ingreso_id" colspan="2"
85 attrs="{'required':[('ingresar','&gt;',0)]}"/>
86 </group>
87 </group>
88 <group colspan="4" >
89 <group>
90 <field name="state" select="2" readonly="1" />
91 <field name="calculation_date" readonly="1"/>
92 </group>
93 <group colspan="4" col="10">
94 <button name="button_calculate"
95 type="object"
96 string="Calculate"
97 states="draft"
98 icon="terp-stock_format-scientific"
99 />
100 <button name="button_recalculate"
101 type="object"
102 string="Recalculate"
103 states="calculating,calculated"
104 icon="gtk-execute"/>
105 <button name="button_export"
106 type="object"
107 string="Export to BOE"
108 states="done"
109 icon="gtk-execute"/>
110 <button name="confirm" string="Confirm" type="object" states="calculated" icon="gtk-ok"/>
111 <button name="cancel" string="Cancel" type="object" states="calculated,done" icon="gtk-cancel"/>
112 <button name="action_recover" string="Draft" type="object" states="canceled" icon="gtk-undo"/>
113 </group>
114 </group>
115 </page>
116 </notebook>
117 </form>
118 </field>
119 </record>
120
121 <record id="view_l10n_es_aeat_mod303_report_search" model="ir.ui.view">
122 <field name="name">AEAT Model 303 (search)</field>
123 <field name="model">l10n.es.aeat.mod303.report</field>
124 <field name="type">search</field>
125 <field name="arch" type="xml">
126 <search string="AEAT 303">
127 <group col="8" colspan="4">
128 <filter icon="terp-gtk-media-pause" string="Draft" domain="[('state','=','draft')]" help="Draft models"/>
129 <filter icon="gtk-execute" string="In process" domain="[('state','in',('calculating', 'calculated'))]" help="In process models"/>
130 <filter icon="terp-camera_test" string="Done" domain="[('state','=','done')]" help="Confirmed models"/>
131 <filter icon="gtk-cancel" string="Cancelled" domain="[('state', '=', 'canceled')]" help="Cancelled models"/>
132 <separator orientation="vertical"/>
133 <filter string="Fiscal Year" icon="terp-folder-orange" domain="[]" context="{'group_by':'fiscalyear_id'}"/>
134 <separator orientation="vertical"/>
135 <filter string="Company" icon="terp-personal" domain="[]" context="{'group_by':'company_id'}"/>
136 </group>
137 <newline/>
138 </search>
139 </field>
140 </record>
141
142 <!-- Window action -->
143 <record id="action_l10n_es_aeat_mod303_report" model="ir.actions.act_window">
144 <field name="name">AEAT Model 303</field>
145 <field name="res_model">l10n.es.aeat.mod303.report</field>
146 <field name="view_type">form</field>
147 <field name="view_mode">tree,form</field>
148 <field name="help">Create and query AEAT Model 303 Reports</field>
149 </record>
150
151
152
153
154 <!-- ### MENU ACCESS ### -->
155
156 <menuitem
157 id="menu_aeat_mod303_report"
158 parent="l10n_es_aeat.menu_root_aeat"
159 action="action_l10n_es_aeat_mod303_report"
160 sequence="50"
161 name="AEAT 303 Model"/>
162
163 </data>
164</openerp>
0165
=== added file 'l10n_es_aeat_mod303/mod303_workflow.xml'
--- l10n_es_aeat_mod303/mod303_workflow.xml 1970-01-01 00:00:00 +0000
+++ l10n_es_aeat_mod303/mod303_workflow.xml 2013-10-10 17:06:51 +0000
@@ -0,0 +1,72 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data>
4
5 <record id="wkf_l10n_es_aeat_mod303_report" model="workflow">
6 <field name="name">AEAT 303 Report</field>
7 <field name="osv">l10n.es.aeat.mod303.report</field>
8 <field name="on_create">True</field>
9 </record>
10
11
12 <!--
13 ### NODES ###
14 -->
15 <record id="act_draft" model="workflow.activity">
16 <field name="wkf_id" ref="wkf_l10n_es_aeat_mod303_report"/>
17 <field name="flow_start">True</field>
18 <field name="name">draft</field>
19 </record>
20
21 <record id="act_calculate" model="workflow.activity">
22 <field name="wkf_id" ref="wkf_l10n_es_aeat_mod303_report"/>
23 <field name="name">calculated</field>
24 <field name="action">write({'state':'calculated'})</field>
25 <field name="kind">function</field>
26 </record>
27
28 <record id="act_confirm" model="workflow.activity">
29 <field name="wkf_id" ref="wkf_l10n_es_aeat_mod303_report"/>
30 <field name="name">confirmed</field>
31 <field name="action">action_confirm()</field>
32 <field name="kind">function</field>
33 </record>
34
35 <record id="act_cancel" model="workflow.activity">
36 <field name="wkf_id" ref="wkf_l10n_es_aeat_mod303_report"/>
37 <field name="name">canceled</field>
38 <field name="flow_stop">True</field>
39 <field name="action">write({'state':'canceled'})</field>
40 <field name="kind">function</field>
41 </record>
42
43
44 <!--
45 ### TRANSITIONS ###
46 -->
47 <record id="trans_draft_calculate" model="workflow.transition">
48 <field name="act_from" ref="act_draft"/>
49 <field name="act_to" ref="act_calculate"/>
50 <field name="signal">calculate</field>
51 </record>
52
53 <record id="trans_calculate_confirm" model="workflow.transition">
54 <field name="act_from" ref="act_calculate"/>
55 <field name="act_to" ref="act_confirm"/>
56 <field name="signal">confirm</field>
57 </record>
58
59 <record id="trans_calculate_draft" model="workflow.transition">
60 <field name="act_from" ref="act_calculate"/>
61 <field name="act_to" ref="act_cancel"/>
62 <field name="signal">cancel</field>
63 </record>
64
65 <record id="trans_confirm_cancel" model="workflow.transition">
66 <field name="act_from" ref="act_confirm"/>
67 <field name="act_to" ref="act_cancel"/>
68 <field name="signal">cancel</field>
69 </record>
70
71 </data>
72</openerp>
073
=== added directory 'l10n_es_aeat_mod303/security'
=== added file 'l10n_es_aeat_mod303/security/ir.model.access.csv'
--- l10n_es_aeat_mod303/security/ir.model.access.csv 1970-01-01 00:00:00 +0000
+++ l10n_es_aeat_mod303/security/ir.model.access.csv 2013-10-10 17:06:51 +0000
@@ -0,0 +1,6 @@
1"id","name","model_id:id","group_id:id","perm_read","perm_write","perm_create","perm_unlink"
2"access_l10n_es_aeat_mod303","l10n_es_aeat_mod303","model_l10n_es_aeat_mod303_report","account.group_account_user",1,0,0,0
3"access_l10n_es_aeat_mod303_manager","l10n_es_aeat_mod303 manager","model_l10n_es_aeat_mod303_report","account.group_account_manager",1,1,1,1
4
5
6
07
=== added directory 'l10n_es_aeat_mod303/wizard'
=== added file 'l10n_es_aeat_mod303/wizard/__init__.py'
--- l10n_es_aeat_mod303/wizard/__init__.py 1970-01-01 00:00:00 +0000
+++ l10n_es_aeat_mod303/wizard/__init__.py 2013-10-10 17:06:51 +0000
@@ -0,0 +1,26 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2012 Guadaltech. All Rights Reserved
6# Author: Isaac De la Barrera
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program. If not, see http://www.gnu.org/licenses/.
20#
21##############################################################################
22
23
24import export_mod303_to_boe
25
26# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
0\ No newline at end of file27\ No newline at end of file
128
=== added file 'l10n_es_aeat_mod303/wizard/export_mod303_to_boe.py'
--- l10n_es_aeat_mod303/wizard/export_mod303_to_boe.py 1970-01-01 00:00:00 +0000
+++ l10n_es_aeat_mod303/wizard/export_mod303_to_boe.py 2013-10-10 17:06:51 +0000
@@ -0,0 +1,282 @@
1# -*- encoding: utf-8 -*-
2##############################################################################
3#
4# OpenERP, Open Source Management Solution
5# Copyright (C) 2013 Guadaltech. All Rights Reserved
6# Author: Alberto Martín Cortada
7#
8# This program is free software: you can redistribute it and/or modify
9# it under the terms of the GNU General Public License as published by
10# the Free Software Foundation, either version 3 of the License, or
11# (at your option) any later version.
12#
13# This program is distributed in the hope that it will be useful,
14# but WITHOUT ANY WARRANTY; without even the implied warranty of
15# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16# GNU General Public License for more details.
17#
18# You should have received a copy of the GNU General Public License
19# along with this program. If not, see http://www.gnu.org/licenses/.
20#
21##############################################################################
22
23
24__author__ = "Alberto Martín Cortada"
25
26import base64
27import time
28from datetime import datetime
29
30
31from tools.translate import _
32from osv import osv
33from account.report.account_tax_report import tax_report
34
35
36class l10n_es_aeat_mod303_export_to_boe(osv.osv_memory):
37
38 _inherit = "l10n.es.aeat.report.export_to_boe"
39 _name = "l10n.es.aeat.mod303.export_to_boe"
40 _description = "Export AEAT Model 303 to BOE format"
41
42
43 def _get_formated_declaration(self,report):
44
45 file_contents = ''
46
47 ## cabecera
48
49 file_contents += "<T30301>" ## pos 1
50
51 file_contents += ' ' ## pos 9
52
53 ## pos 10
54 ## tipo de declaración - "Para impresión, cualquier caracter Alfanumerico o 'N' si la autoliquidación se declara SIN ACTIVIDAD"
55
56 file_contents += self._formatString("N" if report.sin_actividad else " ",1) ## pos 10
57
58 ## identificación (1)
59
60 file_contents += self._formatString(report.company_vat, 9) ## pos 19 # NIF del declarante
61
62 file_contents += self._formatString(report.company_id.name, 30) ## pos 49 # Apellidos o Razon Social.
63 file_contents += self._formatString("", 15) ## pos 64 # Nombre
64
65 file_contents += self._formatBoolean(report.devolucion_mensual, yes='1', no='2') # pos 65
66
67
68 ## devengo (2)
69
70 file_contents += self._formatNumber(report.fiscalyear_id.code, 4) ## 69
71 file_contents += self._formatString(report.period,2) ## 71
72
73
74 assert len(file_contents) == 71, _("The identification (1) and income (2) must be 72 characters long")
75 return file_contents
76
77 def _get_formated_vat(self,cr,uid,ids,report):
78
79
80 model_report_obj = self.pool.get("l10n.es.aeat.mod303.report")
81 file_contents = ''
82
83 ## lines obtenido de account_tax_report
84
85 lines = model_report_obj._get_report_lines(cr,uid,ids)
86
87 ## IVA devengado
88
89 # -- Regimen General y Recargo de Equivalencia - codes [1~18]
90
91 for codes in [('[01]','[03]'),('[04]','[06]'),('[07]','[09]'), ## regimen general
92 ('[10]','[12]'),('[13]','[15]'),('[16]','[18]')]: ## recargo equivalencia
93
94 base_imponible = lines.get(codes[0],0)
95 cuota = lines.get(codes[1],0)
96
97 file_contents += self._formatNumber(base_imponible, 15,2) # base imponible X % -- codes [1,4,7,10,13,16]
98 file_contents += self._formatNumber(cuota / base_imponible * 100 if base_imponible else 0, 3,2) # tipo % codes - [2,5,8,11,14,17]
99 file_contents += self._formatNumber(cuota, 15,2) # cuota X % -- codes [3,6,9,12,15,18]
100
101
102 # -- Adquisiciones Intracomunitarias - codes [19,20]
103
104 file_contents += self._formatNumber(lines.get("[19]"), 15,2) ## base imponible
105 file_contents += self._formatNumber(lines.get("[20]"), 15,2) ## cuota
106
107 # -- Total Cuota Devengada - code [21]
108
109 file_contents += self._formatNumber(report.total_devengado, 15,2) ## cuota
110
111 ## IVA deducible
112
113 # -- Por Cuotas soportadas ... - codes [22~25]
114 # -- Por Cuotas satisfechas en ... - codes [26~29]
115 # -- En adquisiciones intracomunitarias de bienes ... - codes [30~33]
116
117 for i in range(22,34):
118 file_contents += self._formatNumber(lines.get("[%s]" % i), 15,2)
119
120 # --
121
122 file_contents += self._formatNumber(lines.get("[34]"), 15,2) # Compesaciones Regimen Especial AG y P
123 file_contents += self._formatNumber(lines.get("[35]"), 15,2) # Regularización Inversiones
124 file_contents += self._formatNumber(lines.get("[36]"), 15,2) # Regularización Inversiones por aplicación del porcentage def de prorrata
125
126 # -- Total a deducir
127
128 file_contents += self._formatNumber(report.total_deducir, 15,2)
129
130 ## Diferencia [21] - [37]
131 file_contents += self._formatNumber(report.diferencia, 15,2)
132
133 ## Atribuible a la administracion ...
134
135 file_contents += self._formatNumber(report.porcentaje_atribuible_estado, 3,2) ## TODO Navarra y País Vasco
136 file_contents += self._formatNumber(report.atribuible_estado, 15,2)
137
138
139 file_contents += self._formatNumber(report.cuota_compensar, 15,2) ## [41]
140
141
142 ## Entregas intracomunitarias [42], Exportaciones y operaciones asimiladas ... [43], Derecho a deucción [44]
143
144 file_contents += self._formatNumber(lines.get("[42]"), 15,2)
145 file_contents += self._formatNumber(lines.get("[43]"), 15,2)
146 file_contents += self._formatNumber(lines.get("[44]"), 15,2)
147
148 ## Estado y Comunidades Forales
149
150 file_contents += self._formatNumber(report.regularizacion_anual, 15,2)
151
152 file_contents += self._formatNumber(report.resultado_casilla_46, 15,2) ## [40] - [41]
153
154 ## A deducir - autoliquidación complementaria .... pedir campo
155
156 file_contents += self._formatNumber(report.previus_result if report.complementaria else 0, 15,2)
157 file_contents += self._formatNumber(report.resultado_liquidacion, 15,2) ## [48]
158
159 ## A compensar
160 file_contents += self._formatNumber(report.compensar, 15,2) ## [49]
161
162 ## Marca SIN ACTIVIDAD
163
164 file_contents += self._formatBoolean( report.sin_actividad , yes='1', no='2') #
165
166 assert len(file_contents) == 822 - 72, _("The vat records must be 749 characters long and are %s") % len(file_contents)
167 return file_contents
168
169 def _get_formated_last_info(self, report):
170
171 file_contents = ''
172
173 ## devolucion (6)
174
175 file_contents += self._formatNumber(report.devolver,15,2) ## devolucion [50]
176
177 ccc = ""
178 if report.cuenta_devolucion_id and report.devolver:
179 ccc = report.cuenta_devolucion_id.acc_number.replace("-","").replace(" ","")
180 if not (len(ccc) == 20 and ccc.isdigit()):
181 raise osv.except_osv(_('Warning'), _("CCC de devolución no válida \n%s") % ccc)
182
183 file_contents += self._formatString(ccc,20) ## no hay devolución
184
185 """
186 ## ingreso (7)
187
188 859 1 Num Ingreso (7) - Forma de pago
189 860 17 N Ingreso (7) - Importe [I]
190 877 4 An Ingreso (7) - Código cuenta cliente - Entidad
191 881 4 An Ingreso (7) - Código cuenta cliente - Oficina
192 885 2 An Ingreso (7) - Código cuenta cliente - DC
193 887 10 An Ingreso (7) - Código cuenta cliente - Número de cuenta
194 """
195
196 file_contents += self._formatString("0",1) ## NO SE USA ??? Forma de Pago - "0" No consta, "1" Efectivo,"2" Adeudo en cuenta, "3" Domiciliación
197 file_contents += self._formatNumber(report.ingresar,15,2) ## devolucion [50]
198
199 ccc = ""
200 if report.cuenta_ingreso_id and report.ingresar:
201 ccc = report.cuenta_ingreso_id.acc_number.replace("-","").replace(" ","")
202 if not (len(ccc) == 20 and ccc.isdigit()):
203 raise osv.except_osv(_('Warning'), _("CCC de ingreso no válido %s") % ccc)
204
205 file_contents += self._formatString(ccc,20) ## no hay devolución
206
207
208 """
209 897 1 Num Complementaria (8) Indicador Autoliquidación complementaria
210 898 13 An Complementaria (8) - no justificante declaración anterior
211 """
212
213 file_contents += self._formatBoolean(report.complementaria, yes='1', no='0') #
214 file_contents += self._formatString(report.previous_number if report.complementaria else "" ,13)
215
216
217 ## TODO -- hardcode por ahora ...
218 """ Autorización Conjunta """
219 file_contents += self._formatBoolean(False, yes='1', no=' ')
220 file_contents += self._formatString(' ',1) ## 77 autodeclaracion del concurso .... -- ' ' , '1' o '2'
221
222
223 file_contents += ' '*398 ## campo reservado
224
225 ## firma (9)
226
227 file_contents += self._formatString(report.company_id.partner_id.city,16) ## Localidad
228
229
230 calculation_date = datetime.strptime(report.calculation_date,"%Y-%m-%d %H:%M:%S")
231 file_contents += self._formatString(calculation_date.strftime("%d"),2) ## fecha: Dia
232 file_contents += self._formatString(_(calculation_date.strftime("%B")),10) ## fecha: Mes
233 file_contents += self._formatString(calculation_date.strftime("%Y"),4) ## fecha: Anio
234
235 file_contents += self._formatString("</T30301>",9)
236 file_contents += "\r\n".encode("ascii")
237
238# print file_contents
239 return file_contents
240
241
242 def _export_boe_file(self, cr, uid, ids, report, model=None, context=None):
243 """
244 Action that exports the data into a BOE formated text file
245 """
246 if context is None:
247 context = {}
248
249 assert model , _("AEAT Model is necessary")
250
251 file_contents = ''
252
253 ##
254 ## IDENTIFICACION (1) y DEVENGO (2)
255 file_contents += self._get_formated_declaration(report)
256
257 ##
258 ## LIQUIDACIÓN (3) y COMPENSACION(4)
259
260 file_contents += self._get_formated_vat(cr,uid,ids,report)
261
262 ##
263 ## DEVOLUCION (6), INGRESO (7), COMPLEMENTARIA (8) Y FIRMA (9)
264 file_contents += self._get_formated_last_info(report)
265
266 assert len(file_contents) == 1353, _("The 303 report must be 1353 characters long and are %s") % len(file_contents)
267
268
269 ##
270 ## Generate the file and save as attachment
271 file = base64.encodestring(file_contents)
272
273 file_name = _("%s_report_%s.txt") % (model, time.strftime(_("%Y-%m-%d")))
274 self.pool.get("ir.attachment").create(cr, uid, {
275 "name" : file_name,
276 "datas" : file,
277 "datas_fname" : file_name,
278 "res_model" : "l10n.es.aeat.mod%s.report" % model,
279 "res_id" : ids and ids[0]
280 }, context=context)
281
282l10n_es_aeat_mod303_export_to_boe()