Merge lp:~asertigs/openerp-spain/7.0-l10n_es_aeat_mod340-binversion into lp:~openerp-spain-team/openerp-spain/7.0

Proposed by PabloCM
Status: Rejected
Rejected by: Pedro Manuel Baeza
Proposed branch: lp:~asertigs/openerp-spain/7.0-l10n_es_aeat_mod340-binversion
Merge into: lp:~openerp-spain-team/openerp-spain/7.0
Diff against target: 4092 lines (+1996/-803) (has conflicts)
13 files modified
l10n_es_aeat_mod340/__openerp__.py (+13/-5)
l10n_es_aeat_mod340/account.py (+216/-151)
l10n_es_aeat_mod340/account_invoice.py (+74/-0)
l10n_es_aeat_mod340/account_view.xml (+33/-4)
l10n_es_aeat_mod340/i18n/es.po (+285/-318)
l10n_es_aeat_mod340/i18n/l10n_es_aeat_mod340.pot (+249/-168)
l10n_es_aeat_mod340/mod340.py (+174/-38)
l10n_es_aeat_mod340/mod340_view.xml (+342/-0)
l10n_es_aeat_mod340/res_partner.py (+1/-3)
l10n_es_aeat_mod340/security/ir.model.access.csv (+2/-0)
l10n_es_aeat_mod340/taxes_common.xml (+284/-0)
l10n_es_aeat_mod340/wizard/calculate_mod340_records.py (+148/-75)
l10n_es_aeat_mod340/wizard/export_mod340_to_boe.py (+175/-41)
Text conflict in l10n_es_aeat_mod340/__openerp__.py
Text conflict in l10n_es_aeat_mod340/account_view.xml
Text conflict in l10n_es_aeat_mod340/i18n/es.po
Text conflict in l10n_es_aeat_mod340/mod340_view.xml
Contents conflict in l10n_es_aeat_mod340/taxes_data.xml
To merge this branch: bzr merge lp:~asertigs/openerp-spain/7.0-l10n_es_aeat_mod340-binversion
Reviewer Review Type Date Requested Status
Pedro Manuel Baeza Pending
Review via email: mp+221637@code.launchpad.net

Description of the change

Soporte para bienes de inversión, IVA agrario, arreglo de bugs y adaptación a v7

Más info: https://groups.google.com/d/msg/openerp-spain/FsDXI4YOaZw/DNx8ZqXEW58J

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

El proyecto está hospedado ahora en https://github.com/OCA/l10n-spain.

Mueve por favor tu propuesta allí. Esta guía puede ayudarte: https://github.com/OCA/maintainers-tools/wiki/How-to-move-a-Merge-Proposal-to-GitHub

De todas formas, tal como hemos hablado en la lista, la propuesta requiere reelaboración que pasaremos a tratar en el code sprint.

Un saludo.

Unmerged revisions

462. By Pablo <pablo@pablo-pc>

[IMP] Para determinar las claves de una factura se tiene ahora en cuenta primero la línea de mayor importe
[FIX] Los registros de IVA se crean ahora con clave B si la factura tiene marcado el check de resumen de tickets
[IMP] Mejorado el mensaje de error cuando no se puede determinar el tipo de una línea de impuesto

461. By Pablo <pablo@pablo-pc>

[FIX] Eliminado código basura que faltó por quitar en la anterior revisión al eliminar la clave amount_tax
[FIX] Problema con los signos de las bases surgido al soportar moneda distinta a la de la compañía
[MOD] Se permite un descuadre de 1 céntimo al comprobar las bases de los impuestos contra el subtotal de la factura

460. By Pablo <pablo@pablo-pc>

[ADD] Añadida opción tiques / factura simplificada a las claves operacionales
[FIX] Arreglada comparación de las bases cuando las bases sumaban 0 (-0.0 != 0.0 en string)
[FIX] Ahora se tiene en cuenta que la moneda de la factura pueda ser distinta de la de la empresa

459. By Pablo <pablo@pablo-pc>

[ADD] chart_update para cargar las claves de libro y operación
[ADD] Traducción

458. By Pablo <pablo@pablo-pc>

[FIX] Problema en el cálculo de totales cuando no hay ningún registro en el modelo
[FIX] Descuadre en las cuotas debido al recuento doble de las cuotas en compras intracomunitarias
[FIX] Arreglado descuadre en el total de las bases por la separación en líneas de impuesto distintas de un mismo impuesto sobre bases de distinto signo que hace OpenERP

457. By Pablo <pablo@pablo-pc>

[FIX] Eliminada opción obsoleta "select" de las vistas
[FIX] Duplicidad en la fecha de cálculo en la vista
[FIX] Eliminada redeclaración de la fecha de cálculo que la convertía en date (en lugar de datetime)
[FIX] Corregido el cálculo de los sumatorios de registros y totales (campos funcionales) y eliminados los sumatorios manuales que se hacían en el calculate, que eran código basura
[FIX] Eliminado código obsoleto en vistas

456. By Pablo <pablo@pablo-pc>

[ADD] Añadidos campos de clave operacional y clave de libro a los registros de factura (emitida, recibida, bienes, intra) e impuestos que determinan la clasificación de los registros de IVA.
[MOD] El campo mod340 en los códigos de impuesto ha pasado a ser funcional almacenado, dependiendo de la clave de libro de los impuestos. Si algún impuesto que use un código para su base tiene asignada una clave de libro, el código se considera que debe ser incluido en el 340
[FIX] Ahora los impuestos que se desdoblan por tener impuestos hijo (ej: compras intracomunitarias) sólo generan un registro
[FIX] Cuando una factura es rectificativa y con varios impuestos predomina la clave operacional rectificativa y el número de registros en el desglose es 1 (antes salían múltiples)
[FIX] Soporte para facturas con recargo de equivalencia, ya no se exporta el recargo como otro registro
[ADD] Soporte para IVA agrario: cuando se detecta un impuesto con clave operacional X, su tipo se exporta como 0%
[ADD] Soporte para facturas de bienes de inversión
[ADD] Añadida opción para aplicar o no prorrateo a los bienes de inversión, que determina si se exportarán las facturas de bienes de inversión en su libro o como simples facturas recibidas
[FIX] Ahora las claves de libro se cogen del modelo calculado y no son valores fijos en la exportación a fichero

[IMP/TODO] Añadida función para la exportación de fechas que falta mover a l10n_es_aeat
[TODO] Algunos campos de la exportación de los registros de bienes de inversión. Más información en la descripción de la función
[TODO] Account chart update para cargar claves de libro y operacionales

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'l10n_es_aeat_mod340/__openerp__.py'
--- l10n_es_aeat_mod340/__openerp__.py 2014-03-21 01:45:15 +0000
+++ l10n_es_aeat_mod340/__openerp__.py 2014-06-01 16:57:08 +0000
@@ -26,25 +26,29 @@
26 'name' : 'Generación de fichero modelo 340 y libro de IVA',26 'name' : 'Generación de fichero modelo 340 y libro de IVA',
27 'version' : '2.0',27 'version' : '2.0',
28 'author' : 'Acysos S.L., Francisco Pascual (Ting), Nan-tic',28 'author' : 'Acysos S.L., Francisco Pascual (Ting), Nan-tic',
29 'contributors': ["Aserti Global Solutions"],
29 'website' : 'www.acysos.com, www.ting.es, www.nan-tic.com',30 'website' : 'www.acysos.com, www.ting.es, www.nan-tic.com',
30 'category' : 'Localisation/Accounting',31 'category' : 'Localisation/Accounting',
31 'description' : '''32 'description' : '''
32Módulo para la presentación del modelo 340. Exportación a formato AEAT. Libro de IVA33Módulo para la presentación del modelo 340. Exportación a formato AEAT. Libro de IVA
3334
34Los impuestos incluidos en este modelo se indican en el Código base cuenta. Por defecto actualiza todos los código base que deban incluirse.35Los impuestos incluidos en este modelo se indican asignándoles una clave de libro.
35Si el plan contable esta instalado recuerde utilizar account_chart_update para actualizar los códigos. Contabilidad y Finanzas -> Configuración -> Contabilidad Financiera -> Actualizar plan contable a partir de una plantila de plan contable36Si el plan contable esta instalado recuerde utilizar account_chart_update para actualizar los impuestos.
37Contabilidad -> Configuración -> Cuentas -> Actualizar plan de cuentas
3638
37Búsqueda de facturas emitidas y recibidas.39Búsqueda de facturas emitidas, recibidas y de inversión.
38Exportación a formato de AEAT de facturas emitidas y recibidas.40Exportación a formato de AEAT de facturas emitidas, recibidas y de inversión.
39Exportación de facturas con varios tipos impositivos. Clave de operación C.41Exportación de facturas con varios tipos impositivos. Clave de operación C.
40Facturas intracomunitarias excepto las operaciones a las que hace referencia el artículo 66 del RIVA que tienen un tratamiento especial.42Facturas intracomunitarias excepto las operaciones a las que hace referencia el artículo 66 del RIVA que tienen un tratamiento especial.
41Facturas rectificativas.43Facturas rectificativas.
42Facturas resumen de tiques.44Facturas resumen de tiques.
45Recargos de equivalencia.
43Permite imprimir el libro de IVA, basado en la misma legislación.46Permite imprimir el libro de IVA, basado en la misma legislación.
4447
48
45--- COSAS PENDIENTES (TODO LIST) ----------------------------------------------49--- COSAS PENDIENTES (TODO LIST) ----------------------------------------------
4650
47Facturas bienes de inversión51Facturas bienes de inversión: la prorrata anual definitiva hay que introducirla a mano una vez calculado el modelo. Integrar con módulo assets
48Facturas intracomunitarias. Operaciones a las que hace referencia el artículo 66 del RIVA.52Facturas intracomunitarias. Operaciones a las que hace referencia el artículo 66 del RIVA.
49Asientos contables de resumen de tiques53Asientos contables de resumen de tiques
50Exportación de asientos resumen de facturas54Exportación de asientos resumen de facturas
@@ -67,8 +71,12 @@
67 'mod340_sequence.xml',71 'mod340_sequence.xml',
68 'account_invoice_view.xml',72 'account_invoice_view.xml',
69 'account_view.xml',73 'account_view.xml',
74<<<<<<< TREE
70 'taxes_data.xml',75 'taxes_data.xml',
71 ],76 ],
77=======
78 'taxes_common.xml'],
79>>>>>>> MERGE-SOURCE
72 'installable' : True,80 'installable' : True,
73 'active' : False,81 'active' : False,
74}82}
7583
=== modified file 'l10n_es_aeat_mod340/account.py'
--- l10n_es_aeat_mod340/account.py 2014-02-09 16:33:45 +0000
+++ l10n_es_aeat_mod340/account.py 2014-06-01 16:57:08 +0000
@@ -21,171 +21,236 @@
2121
22from openerp.osv import orm, fields22from openerp.osv import orm, fields
23from openerp.tools.translate import _23from openerp.tools.translate import _
2424from collections import defaultdict
25class account_tax_code_template(orm.Model):25
2626class account_tax(orm.Model):
27 _inherit = 'account.tax.code.template'27
28 28 _inherit = 'account.tax'
29 _columns = {29
30 'mod340':fields.boolean("Include in mod340"),30 def _allowed_pct_by_ledger(self, cr, uid, context=None):
31 tax_obj = self.pool.get('account.tax')
32 res = defaultdict(set)
33 tax_ids = tax_obj.search(cr, uid, [('ledger_key','!=',False)], context=context)
34 for tax in tax_obj.browse(cr, uid, tax_ids, context):
35 res[tax.ledger_key].add(abs(tax.amount))
36 return res
37
38
39 def get_operation_keys(self, cr, uid, context=None):
40 return [('-', u'Recargo de equivalencia'),
41 (' ', u'Operación habitual'),
42 ('F', u'F-Adquisiciones realizadas por las agencias de viajes directamente en interés del viajero (Régimen especial de agencias de viajes)'),
43 ('H', u'H-Régimen especial de oro de inversión'),
44 ('I', u'I-Inversión del Sujeto pasivo (ISP)'),
45 ('J', u'J-Tiques / Factura simplificada'),
46 ('L', u'L-Adquisiciones a comerciantes minoristas del IGIC'),
47 ('N', u'N-Facturación de las prestaciones de servicios de agencias de viaje que actúan como mediadoras en nombre y por cuenta ajena'),
48 ('P', u'P-Adquisiciones intracomunitarias de bienes.'),
49 ('Q', u'Q-Operaciones a las que se aplique el Régimen especial de bienes usados, objetos de arte, antigüedades y objetos de colección'),
50 ('R', u'R-Operación de arrendamiento de local de negocio'),
51 ('S', u'S-Subvenciones, auxilios o ayudas satisfechas o recibidas, tanto por parte de Administraciones públicas como de entidades privadas'),
52 ('V', u'V-Compras de Agencias viajes'),
53 ('W', u'W-Operaciones sujetas al Impuesto sobre la Producción, los Servicios y la Importación en las Ciudades de Ceuta y Melilla'),
54 ('X', u'X-Operaciones por las que los empresarios o profesionales que satisfagan compensaciones agrícolas, ganaderas y/o pesqueras hayan expedido el recibo correspondiente'),]
55
56 def _get_operation_keys(self, cr, uid, context=None):
57 return self.get_operation_keys(cr, uid, context=context)
58
59 def get_ledger_keys(self, cr, uid, context=None):
60 return [('E', u'E-Libro registro de facturas expedidas.'),
61 ('F', u'F-Libro registro de facturas expedidas IGIC.'),
62 ('R', u'R-Libro registro de facturas recibidas.'),
63 ('I', u'I-Libro registro de bienes de inversión.'),
64 ('J', u'J-Libro de registro de bienes de inversión IGIC.'),
65 ('S', u'S-Libro de registro de facturas recibidas IGIC.'),
66 ('U', u'U-Libro registro de determinadas operaciones intracomunitarias.')]
67
68 def _get_ledger_keys(self, cr, uid, context=None):
69 return self.get_ledger_keys(cr, uid, context=context)
70
71 def get_ledger_keys_out(self, cr, uid, context=None):
72 return [('E', u'E-Libro registro de facturas expedidas.'),
73 ('F', u'F-Libro registro de facturas expedidas IGIC.'),
74 ('U', u'U-Libro registro de determinadas operaciones intracomunitarias.')]
75
76 def _get_ledger_keys_out(self, cr, uid, context=None):
77 return self.get_ledger_keys_out(cr, uid, context=context)
78
79 def get_ledger_keys_in(self, cr, uid, context=None):
80 return [('R', u'R-Libro registro de facturas recibidas.'),
81 ('I', u'I-Libro registro de bienes de inversión.'),
82 ('J', u'J-Libro de registro de bienes de inversión IGIC.'),
83 ('S', u'S-Libro de registro de facturas recibidas IGIC.'),
84 ('U', u'U-Libro registro de determinadas operaciones intracomunitarias.')]
85
86 def _get_ledger_keys_in(self, cr, uid, context=None):
87 return self.get_ledger_keys_in(cr, uid, context=context)
88
89 def _calc_ledger(self, cr, uid, ids, field_names, arg, context=None):
90 res = dict.fromkeys(ids, {})
91 for tax in self.browse(cr, uid, ids, context):
92 res[tax.id]['ledger_key_out'] = False
93 res[tax.id]['ledger_key_in'] = False
94 if tax.type_tax_use == "purchase":
95 res[tax.id]['ledger_key_in'] = tax.ledger_key
96 elif tax.type_tax_use == "sale":
97 res[tax.id]['ledger_key_out'] = tax.ledger_key
98 return res
99
100 def _set_ledger(self, cr, uid, ids, field_names, field_value, arg, context):
101 if not isinstance(ids, (tuple, list)):
102 ids = [ids]
103 taxes = self.browse(cr, uid, ids, context)
104 for field in field_names:
105 if field == "ledger_key_in":
106 self.write(cr, uid, [tax.id for tax in taxes if tax.type_tax_use in ('purchase', 'all')], {'ledger_key': field_value}, context)
107 else:
108 self.write(cr, uid, [tax.id for tax in taxes if tax.type_tax_use in ('sale', 'all')], {'ledger_key': field_value}, context)
109
110 def onchange_ledger(self, cr, uid, ids, field, key, context=None):
111 value = {
112 'ledger_key': key
113 }
114 return {'value': value}
115
116 def onchange_type_tax_use(self, cr, uid, ids, context=None):
117 value = {
118 'ledger_key': False,
119 'ledger_key_in': False,
120 'ledger_key_out': False
121 }
122 return { 'value': value }
123
124 _columns = {
125 'operation_key': fields.selection(_get_operation_keys, 'Operation Key'),
126 'ledger_key': fields.selection(_get_ledger_keys, 'Ledger Key', help="Determines to which ledger the invoice with this tax will be assigned. Setting a value makes the tax to be accounted in 340 declaration"),
127 'ledger_key_in': fields.function(_calc_ledger, type="selection", fnct_inv=_set_ledger, selection=_get_ledger_keys_in, string='Ledger Key', multi="ledger",
128 help="Determines to which ledger the invoice with this tax will be assigned. Setting a value makes the tax to be accounted in 340 declaration"),
129 'ledger_key_out': fields.function(_calc_ledger, type="selection", fnct_inv=_set_ledger, selection=_get_ledger_keys_out, string='Ledger Key', multi="ledger",
130 help="Determines to which ledger the invoice with this tax will be assigned. Setting a value makes the tax to be accounted in 340 declaration"),
131 }
132
133class account_tax_template(orm.Model):
134
135 _inherit = 'account.tax.template'
136
137 def _get_ledger_keys(self, cr, uid, context=None):
138 return self.pool.get('account.tax').get_ledger_keys(cr, uid, context=context)
139
140 def _get_operation_keys(self, cr, uid, context=None):
141 return self.pool.get('account.tax').get_operation_keys(cr, uid, context=context)
142
143 _columns = {
144 'operation_key': fields.selection(_get_operation_keys, 'Operation Key'),
145 'ledger_key': fields.selection(_get_ledger_keys, 'Ledger Key'),
31 }146 }
32147
33class account_tax_code(orm.Model):148class account_tax_code(orm.Model):
34149
35 _inherit = 'account.tax.code'150 _inherit = 'account.tax.code'
36 151
152 def _calc_mod340(self, cr, uid, ids, name, args, context=None):
153 tax_obj = self.pool.get('account.tax')
154 res = {}
155 for tax in self.browse(cr, uid, ids, context=context):
156 res[tax.id] = len(tax_obj.search(cr, uid, [('base_code_id','=',tax.id),('ledger_key','!=',False)], context=context)) > 0
157 return res
158
159 def _get_code_affected_by_tax(self, cr, uid, ids, context=None):
160 code_ids = set()
161 for tax in self.pool.get('account.tax').browse(cr, uid, ids, context=context):
162 code_ids.add(tax.base_code_id.id)
163 return list(code_ids)
164
37 _columns = {165 _columns = {
38 'mod340':fields.boolean("Include in mod340"),166 'mod340': fields.function(_calc_mod340, type="boolean", string="Include in mod340",
167 store={
168 'account.tax': (_get_code_affected_by_tax, ['base_code_id', 'ledger_key'], 10),
169 })
39 }170 }
40171
41class wizard_update_charts_accounts(orm.TransientModel):172class wizard_update_charts_accounts(orm.TransientModel):
42 _inherit = 'wizard.update.charts.accounts'173 _inherit = 'wizard.update.charts.accounts'
43 174
44 def _find_tax_codes(self, cr, uid, wizard, context=None):175 def _find_taxes(self, cr, uid, wizard, chart_template_ids, context=None):
45 """176 """
46 Search for, and load, tax code templates to create/update.177 En caso de actualizar impuestos, añade a los impuestos modificados los que
47 """178 tengan claves de operación o libro distintas de sus plantillas
48 new_tax_codes = 0179 """
49 updated_tax_codes = 0180 tax_obj = self.pool['account.tax']
50 tax_code_template_mapping = {}181 tax_templ_obj = self.pool['account.tax.template']
51 182 wiz_taxes_obj = self.pool['wizard.update.charts.accounts.tax']
52 tax_code_templ_obj = self.pool.get('account.tax.code.template')183 res = super(wizard_update_charts_accounts, self)._find_taxes(cr, uid, wizard, chart_template_ids, context)
53 tax_code_obj = self.pool.get('account.tax.code')184
54 wiz_tax_code_obj = self.pool.get('wizard.update.charts.accounts.tax.code')185 if not wizard.update_tax:
55 186 return res
56 # Remove previous tax codes187 updated_taxes = res['updated']
57 wiz_tax_code_obj.unlink(cr, uid, wiz_tax_code_obj.search(cr, uid, []))188 tax_templ_mapping = res['mapping']
58 189 tax_templ_ids = tax_templ_obj.search(cr, uid,
59 #190 [('chart_template_id',
60 # Search for new / updated tax codes191 'in',
61 #192 chart_template_ids)],
62 root_tax_code_id = wizard.chart_template_id.tax_code_root_id.id193 context=context)
63 children_tax_code_template = tax_code_templ_obj.search(cr, uid, 194
64 [('parent_id', 'child_of', [root_tax_code_id])], order='id')195 for tax_templ in tax_templ_obj.browse(cr, uid, tax_templ_ids,
65 for tax_code_template in tax_code_templ_obj.browse(cr, uid, 196 context=context):
66 children_tax_code_template):
67 # Ensure the tax code template is on the map (search for the mapped tax code id).
68 self._map_tax_code_template(cr, uid, wizard,
69 tax_code_template_mapping,
70 tax_code_template, context)
71197
72 tax_code_id = tax_code_template_mapping.get(tax_code_template.id)198 tax_id = self._map_tax_template(cr, uid, wizard,
73 if not tax_code_id:199 tax_templ_mapping,
74 new_tax_codes += 1200 tax_templ, context=context)
75 wiz_tax_code_obj.create(cr, uid, {201
76 'tax_code_id': tax_code_template.id,202 if not tax_id:
203 continue
204
205 modified = False
206 notes = ""
207 tax = tax_obj.browse(cr, uid, tax_id, context=context)
208 if tax.operation_key != tax_templ.operation_key:
209 notes += _("The operation key is different.\n")
210 modified = True
211 if tax.ledger_key != tax_templ.ledger_key:
212 notes += _("The ledger key is different.\n")
213 modified = True
214 if modified:
215 wiz_tax_id = wiz_taxes_obj.search(cr, uid, [('update_chart_wizard_id','=',wizard.id),('update_tax_id','=',tax.id)], context=context)
216 if wiz_tax_id:
217 wiz_tax_line = wiz_taxes_obj.browse(cr, uid, wiz_tax_id[0], context)
218 wiz_taxes_obj.write(cr, uid, wiz_tax_line.id, {'notes': wiz_tax_line.notes + notes}, context)
219 else:
220 updated_taxes += 1
221 wiz_taxes_obj.create(cr, uid, {
222 'tax_id': tax_templ.id,
77 'update_chart_wizard_id': wizard.id,223 'update_chart_wizard_id': wizard.id,
78 'type': 'new',224 'type': 'updated',
225 'update_tax_id': tax_id,
226 'notes': notes,
79 }, context)227 }, context)
80 elif wizard.update_tax_code:228
81 #229 res['updated'] = updated_taxes
82 # Check the tax code for changes.230 return res
83 #231
84 modified = False232 def _update_taxes(self, cr, uid, wizard, log, tax_code_template_mapping, context=None):
85 notes = ""233 """
86 tax_code = tax_code_obj.browse(cr, uid, tax_code_id, context=context)234 Vuelve a reprocesar las líneas de impuestos para actualizar las claves de operación y libro
87235 """
88 if tax_code.code != tax_code_template.code:236 res = super(wizard_update_charts_accounts, self)._update_taxes(cr, uid, wizard, log, tax_code_template_mapping, context)
89 notes += _("The code field is different.\n")237 taxes = self.pool['account.tax']
90 modified = True238
91 if tax_code.info != tax_code_template.info:239 if not wizard.update_tax:
92 notes += _("The info field is different.\n")240 return res
93 modified = True241
94 if tax_code.sign != tax_code_template.sign:242 for wiz_tax in wizard.tax_ids:
95 notes += _("The sign field is different.\n")243 tax_template = wiz_tax.tax_id
96 modified = True244
97 if tax_code.mod340 != tax_code_template.mod340:245 vals_tax = {
98 notes += _("The Mod 340 field is different.\n")246 'operation_key': tax_template.operation_key,
99 modified = True247 'ledger_key': tax_template.ledger_key
100
101 # TODO: We could check other account fields for changes...
102
103 if modified:
104 #
105 # Tax code to update.
106 #
107 updated_tax_codes += 1
108 wiz_tax_code_obj.create(cr, uid, {
109 'tax_code_id': tax_code_template.id,
110 'update_chart_wizard_id': wizard.id,
111 'type': 'updated',
112 'update_tax_code_id': tax_code_id,
113 'notes': notes,
114 }, context)
115
116 return { 'new': new_tax_codes, 'updated': updated_tax_codes,
117 'mapping': tax_code_template_mapping }
118
119 def _update_tax_codes(self, cr, uid, wizard, log, context=None):
120 """
121 Search for, and load, tax code templates to create/update.
122 """
123 tax_code_obj = self.pool.get('account.tax.code')
124
125 root_tax_code_id = wizard.chart_template_id.tax_code_root_id.id
126
127 new_tax_codes = 0
128 updated_tax_codes = 0
129 tax_code_template_mapping = {}
130
131 for wiz_tax_code in wizard.tax_code_ids:
132 tax_code_template = wiz_tax_code.tax_code_id
133 tax_code_name = (root_tax_code_id == tax_code_template.id) and wizard.company_id.name or tax_code_template.name
134
135 # Ensure the parent tax code template is on the map.
136 self._map_tax_code_template(cr, uid, wizard,
137 tax_code_template_mapping,
138 tax_code_template.parent_id, context)
139
140 #
141 # Values
142 #
143 vals = {
144 'name': tax_code_name,
145 'code': tax_code_template.code,
146 'info': tax_code_template.info,
147 'parent_id': tax_code_template.parent_id and tax_code_template_mapping.get(tax_code_template.parent_id.id),
148 'company_id': wizard.company_id.id,
149 'sign': tax_code_template.sign,
150 'mod340': tax_code_template.mod340
151 }248 }
152249
153 tax_code_id = None250 if wiz_tax.type == 'updated' and wiz_tax.update_tax_id:
154 modified = False251 taxes.write(cr, uid, [wiz_tax.update_tax_id.id], vals_tax)
155252# log.add(_("mod340: Updated tax %s.\n") % tax_template.name)
156 if wiz_tax_code.type == 'new':253
157 #254 #No necesitamos llevar control de taxes_pending_for_accounts ni detectar errores, ya lo hizo super
158 # Create the tax code255 return res
159 #256
160 tax_code_id = tax_code_obj.create(cr, uid, vals)
161 log.add(_("Created tax code %s.\n") % tax_code_name)
162 new_tax_codes += 1
163 modified = True
164 elif wizard.update_tax_code and wiz_tax_code.update_tax_code_id:
165 #
166 # Update the tax code
167 #
168 tax_code_id = wiz_tax_code.update_tax_code_id.id
169 tax_code_obj.write(cr, uid, [tax_code_id], vals)
170 log.add(_("Updated tax code %s.\n") % tax_code_name)
171 updated_tax_codes += 1
172 modified = True
173 else:
174 tax_code_id = wiz_tax_code.update_tax_code_id and wiz_tax_code.update_tax_code_id.id
175 modified = False
176
177 # Store the tax codes on the map
178 tax_code_template_mapping[tax_code_template.id] = tax_code_id
179
180 if modified:
181 #
182 # Detect errors
183 #
184 if tax_code_template.parent_id and not tax_code_template_mapping.get(tax_code_template.parent_id.id):
185 log.add(_("Tax code %s: The parent tax code %s can not be set.\n") % (tax_code_name, tax_code_template.parent_id.name), True)
186
187 return {
188 'new': new_tax_codes,
189 'updated': updated_tax_codes,
190 'mapping': tax_code_template_mapping
191 }
192257
=== modified file 'l10n_es_aeat_mod340/account_invoice.py'
--- l10n_es_aeat_mod340/account_invoice.py 2014-02-09 16:33:45 +0000
+++ l10n_es_aeat_mod340/account_invoice.py 2014-06-01 16:57:08 +0000
@@ -21,10 +21,84 @@
2121
22from openerp.osv import orm, fields22from openerp.osv import orm, fields
23from openerp.tools.translate import _23from openerp.tools.translate import _
24from openerp.tools.float_utils import float_round
2425
25class account_invoice(orm.Model):26class account_invoice(orm.Model):
26 _inherit = 'account.invoice'27 _inherit = 'account.invoice'
27 28
29 def get_340_classification(self, cr, uid, invoice_id, context=None):
30 invoice = self.browse(cr, uid, invoice_id, context)
31 if invoice.is_ticket_summary:
32 return 'E', 'B'
33 #Intentamos determinar la clasificación primero en función de la línea de más importe
34 max_line = max(invoice.invoice_line, key=lambda x: abs(x.price_subtotal))
35 taxes = filter(lambda x: x.ledger_key and x.operation_key != '-', max_line.invoice_line_tax_id)
36 if taxes:
37 return taxes[0].ledger_key, (taxes[0].operation_key or ' ')
38 #y si no cualquier otra
39 for line in invoice.invoice_line:
40 taxes = filter(lambda x: x.ledger_key and x.operation_key != '-', line.invoice_line_tax_id)
41 if taxes:
42 return taxes[0].ledger_key, (taxes[0].operation_key or ' ')
43 raise orm.except_orm(
44 'Error',
45 'No se pudo determinar la clasificacion de la factura %s porque sus impuestos no se declaran en el modelo 340' % invoice.number)
46
47
48 def get_inv_good_names(self, cr, uid, invoice_id, tax_percentage, context=None):
49 names = []
50 invoice = self.browse(cr, uid, invoice_id, context)
51 tax_percentage = abs(tax_percentage)
52 for line in invoice.invoice_line:
53 for tax in line.invoice_line_tax_id:
54 if tax.ledger_key in ('I','J') and tax.amount == tax_percentage:
55 names.append(line.name)
56 break
57 return ', '.join(names)
58
59 def get_cc_amounts(self, cr, uid, invoice_id, context=None):
60 #Créditos Zikzakmedia SL @ account_invoice_currency
61 invoice = self.browse(cr, uid, invoice_id, context)
62 if invoice.company_id.currency_id == invoice.currency_id:
63 return {
64 'cc_amount_untaxed': invoice.amount_untaxed,
65 'cc_amount_tax': invoice.amount_tax,
66 'cc_amount_total': invoice.amount_total,
67 }
68
69 res = {
70 'cc_amount_untaxed': 0.0,
71 'cc_amount_tax': 0.0,
72 'cc_amount_total': 0.0,
73 }
74
75 ## It could be computed only in open or paid invoices with a generated account move
76 if invoice.move_id:
77 precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')
78 ## Accounts to compute amount_untaxed
79 line_account = []
80 for line in invoice.invoice_line:
81 if line.account_id.id not in line_account:
82 line_account.append(line.account_id.id)
83
84 ## Accounts to compute amount_tax
85 tax_account = []
86 for line in invoice.tax_line:
87 if line.account_id.id not in tax_account and line.amount != 0:
88 tax_account.append(line.account_id.id)
89
90 ## The company currency amounts are the debit-credit amounts in the account moves
91 for line in invoice.move_id.line_id:
92 if line.account_id.id in line_account:
93 res['cc_amount_untaxed'] += float_round(line.debit - line.credit, precision)
94 if line.account_id.id in tax_account:
95 res['cc_amount_tax'] += float_round(line.debit - line.credit, precision)
96 if invoice.type in ('out_invoice', 'in_refund'):
97 res['cc_amount_untaxed'] = -res['cc_amount_untaxed']
98 res['cc_amount_tax'] = -res['cc_amount_tax']
99 res['cc_amount_total'] = res['cc_amount_tax'] + res['cc_amount_untaxed']
100 return res
101
28 _columns = {102 _columns = {
29 'is_ticket_summary': fields.boolean('Ticket Summary', 103 'is_ticket_summary': fields.boolean('Ticket Summary',
30 help='Check if this invoice is a ticket summary'),104 help='Check if this invoice is a ticket summary'),
31105
=== modified file 'l10n_es_aeat_mod340/account_view.xml'
--- l10n_es_aeat_mod340/account_view.xml 2014-03-20 00:33:19 +0000
+++ l10n_es_aeat_mod340/account_view.xml 2014-06-01 16:57:08 +0000
@@ -1,17 +1,28 @@
1<?xml version="1.0" encoding="utf-8"?>1<?xml version="1.0" encoding="utf-8"?>
2<openerp>2<openerp>
3 <data>3 <data>
4<<<<<<< TREE
4 <record id="view_tax_code_template_form_mod340" model="ir.ui.view">5 <record id="view_tax_code_template_form_mod340" model="ir.ui.view">
5 <field name="name">account.tax.code.template.form.mod340</field>6 <field name="name">account.tax.code.template.form.mod340</field>
6 <field name="model">account.tax.code.template</field>7 <field name="model">account.tax.code.template</field>
7 <field name="inherit_id" ref="account.view_tax_code_template_form"/>8 <field name="inherit_id" ref="account.view_tax_code_template_form"/>
9=======
10
11 <record id="view_account_tax_template_form_mod340" model="ir.ui.view">
12 <field name="name">account.tax.template.form</field>
13 <field name="model">account.tax.template</field>
14 <field name="inherit_id" ref="account.view_account_tax_template_form"/>
15>>>>>>> MERGE-SOURCE
8 <field name="arch" type="xml">16 <field name="arch" type="xml">
9 <field name="sign" position="after">17 <xpath expr="//field[@name='ref_tax_sign']" position="after">
10 <field name="mod340"/>18 <group string="Modelo 340">
11 </field>19 <field name="ledger_key"/>
20 <field name="operation_key"/>
21 </group>
22 </xpath>
12 </field>23 </field>
13 </record>24 </record>
14 25
15 <record id="view_tax_code_form_mod340" model="ir.ui.view">26 <record id="view_tax_code_form_mod340" model="ir.ui.view">
16 <field name="name">account.tax.code.form.mod340</field>27 <field name="name">account.tax.code.form.mod340</field>
17 <field name="model">account.tax.code</field>28 <field name="model">account.tax.code</field>
@@ -22,5 +33,23 @@
22 </field>33 </field>
23 </field>34 </field>
24 </record>35 </record>
36
37 <record id="view_tax_form_mod340" model="ir.ui.view">
38 <field name="name">account.tax.form.mod340</field>
39 <field name="model">account.tax</field>
40 <field name="inherit_id" ref="account.view_tax_form"/>
41 <field name="arch" type="xml">
42 <field name="child_depend" position="after">
43 <separator string="Modelo 340" colspan="2"/>
44 <field name="ledger_key" on_change="onchange_ledger('ledger_key', ledger_key, context)" attrs="{'invisible': [('type_tax_use','!=','all')]}"/>
45 <field name="ledger_key_in" on_change="onchange_ledger('ledger_key_in', ledger_key_in, context)" attrs="{'invisible': [('type_tax_use','!=','purchase')]}"/>
46 <field name="ledger_key_out" on_change="onchange_ledger('ledger_key_out', ledger_key_out, context)" attrs="{'invisible': [('type_tax_use','!=','sale')]}"/>
47 <field name="operation_key"/>
48 </field>
49 <field name="type_tax_use" position="attributes">
50 <attribute name="on_change">onchange_type_tax_use(context)</attribute>
51 </field>
52 </field>
53 </record>
25 </data>54 </data>
26</openerp>55</openerp>
27\ No newline at end of file56\ No newline at end of file
2857
=== modified file 'l10n_es_aeat_mod340/i18n/es.po'
--- l10n_es_aeat_mod340/i18n/es.po 2014-05-12 06:40:26 +0000
+++ l10n_es_aeat_mod340/i18n/es.po 2014-06-01 16:57:08 +0000
@@ -4,21 +4,26 @@
4#4#
5msgid ""5msgid ""
6msgstr ""6msgstr ""
7"Project-Id-Version: OpenERP Server 7.0\n"7"Project-Id-Version: OpenERP Server 7.0-20140331-231318\n"
8"Report-Msgid-Bugs-To: \n"8"Report-Msgid-Bugs-To: \n"
9"POT-Creation-Date: 2014-02-02 18:10+0000\n"9"POT-Creation-Date: 2014-04-01 10:51+0000\n"
10"PO-Revision-Date: 2014-03-18 22:33+0000\n"10"PO-Revision-Date: 2014-04-01 10:51+0000\n"
11"Last-Translator: Ignacio Ibeas (www.acysos.com) <ignacio@acysos.com>\n"11"Last-Translator: <>\n"
12"Language-Team: \n"12"Language-Team: \n"
13"MIME-Version: 1.0\n"13"MIME-Version: 1.0\n"
14"Content-Type: text/plain; charset=UTF-8\n"14"Content-Type: text/plain; charset=UTF-8\n"
15<<<<<<< TREE
15"Content-Transfer-Encoding: 8bit\n"16"Content-Transfer-Encoding: 8bit\n"
16"X-Launchpad-Export-Date: 2014-05-12 06:39+0000\n"17"X-Launchpad-Export-Date: 2014-05-12 06:39+0000\n"
17"X-Generator: Launchpad (build 16996)\n"18"X-Generator: Launchpad (build 16996)\n"
19=======
20"Content-Transfer-Encoding: \n"
21"Plural-Forms: \n"
22>>>>>>> MERGE-SOURCE
1823
19#. module: l10n_es_aeat_mod34024#. module: l10n_es_aeat_mod340
20#: report:report mod340:025#: report:report mod340:0
21#: report:vat_book:026#: report:vat book:0
22msgid "FACTURAS DE SALIDA"27msgid "FACTURAS DE SALIDA"
23msgstr "FACTURAS DE SALIDA"28msgstr "FACTURAS DE SALIDA"
2429
@@ -29,16 +34,14 @@
2934
30#. module: l10n_es_aeat_mod34035#. module: l10n_es_aeat_mod340
31#: report:report mod340:036#: report:report mod340:0
32#: report:report_mod340:0
33#: report:vat book:037#: report:vat book:0
34#: report:vat_book:0
35msgid "Compañía:"38msgid "Compañía:"
36msgstr "Compañía:"39msgstr "Compañía:"
3740
38#. module: l10n_es_aeat_mod34041#. module: l10n_es_aeat_mod340
39#: model:ir.actions.act_window,name:l10n_es_aeat_mod340.action_l10n_es_aeat_mod340_report42#: model:ir.actions.act_window,name:l10n_es_aeat_mod340.action_l10n_es_aeat_mod340_report
40msgid "AEAT model 340"43msgid "AEAT model 340"
41msgstr "Declaración AEAT 340"44msgstr "Modelo AEAT 340"
4245
43#. module: l10n_es_aeat_mod34046#. module: l10n_es_aeat_mod340
44#: view:l10n.es.aeat.mod340.issued:047#: view:l10n.es.aeat.mod340.issued:0
@@ -51,10 +54,14 @@
51msgstr "Exportar Modelo AEAT 340 al formato del BOE"54msgstr "Exportar Modelo AEAT 340 al formato del BOE"
5255
53#. module: l10n_es_aeat_mod34056#. module: l10n_es_aeat_mod340
54#: code:addons/l10n_es_aeat_mod340/account.py:8957#: help:l10n.es.aeat.mod340.report,investment_goods_prorating:0
55#, python-format58msgid "If checked, the investment goods invoices will be exported in their ledger. If not, they will be exported as received invoices"
56msgid "The code field is different.\n"59msgstr "Si se marca, las facturas de bienes de inversión se exportarán en su libro. Si no, se exportarán como facturas recibidas"
57msgstr "El campo código es diferente.\n"60
61#. module: l10n_es_aeat_mod340
62#: field:l10n.es.aeat.mod340.report,investment_goods_prorating:0
63msgid "Investment goods prorating"
64msgstr "Prorrata de bienes de inversión"
5865
59#. module: l10n_es_aeat_mod34066#. module: l10n_es_aeat_mod340
60#: view:l10n.es.aeat.mod340.report:067#: view:l10n.es.aeat.mod340.report:0
@@ -67,26 +74,22 @@
67msgstr "Total"74msgstr "Total"
6875
69#. module: l10n_es_aeat_mod34076#. module: l10n_es_aeat_mod340
70#: code:addons/l10n_es_aeat_mod340/account.py:16177#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:126
71#, python-format78#, python-format
72msgid "Created tax code %s.\n"79msgid "The periods selected don't belong to the fiscal year %s"
73msgstr "Código de impuesto %s creado.\n"80msgstr "Los periodos seleccionados no pertenecen al año fiscal %s"
7481
75#. module: l10n_es_aeat_mod34082#. module: l10n_es_aeat_mod340
76#: view:l10n.es.aeat.mod340.report:083#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:87
77msgid "Susbtitutive/complementary declaration"84#, python-format
78msgstr "Declaración sustitutiva/complementaría"85msgid "No match found for tax percentage %s"
86msgstr "No match found for tax percentage %s"
7987
80#. module: l10n_es_aeat_mod34088#. module: l10n_es_aeat_mod340
81#: view:l10n.es.aeat.mod340.report:089#: view:l10n.es.aeat.mod340.report:0
82#: field:l10n.es.aeat.mod340.report,company_id:090#: field:l10n.es.aeat.mod340.report,company_id:0
83msgid "Company"91msgid "Company"
84msgstr "Compañía"92msgstr "Compañia"
85
86#. module: l10n_es_aeat_mod340
87#: field:l10n.es.aeat.mod340.report,total_sharetax:0
88msgid "Total Share Tax"
89msgstr "Total impuestos"
9093
91#. module: l10n_es_aeat_mod34094#. module: l10n_es_aeat_mod340
92#: field:l10n.es.aeat.mod340.report,number_records:095#: field:l10n.es.aeat.mod340.report,number_records:0
@@ -94,13 +97,10 @@
94msgstr "Registros"97msgstr "Registros"
9598
96#. module: l10n_es_aeat_mod34099#. module: l10n_es_aeat_mod340
97#: code:addons/l10n_es_aeat_mod340/wizard/export_mod340_to_boe.py:390100#: code:addons/l10n_es_aeat_mod340/wizard/export_mod340_to_boe.py:411
98#, python-format101#, python-format
99msgid ""102msgid "The type 2 received record must be 500 characters long for each Vat registry"
100"The type 2 received record must be 500 characters long for each Vat registry"103msgstr "El registro de tipo 2 debe tener una longitud de 500 caracteres por cada registro de IVA"
101msgstr ""
102"El registro de tipo 2 debe tener una longitud de 500 caracteres por cada "
103"registro de IVA"
104104
105#. module: l10n_es_aeat_mod340105#. module: l10n_es_aeat_mod340
106#: selection:l10n.es.aeat.mod340.report,type:0106#: selection:l10n.es.aeat.mod340.report,type:0
@@ -117,6 +117,8 @@
117#: field:l10n.es.aeat.mod340.investment,base_tax:0117#: field:l10n.es.aeat.mod340.investment,base_tax:0
118#: field:l10n.es.aeat.mod340.issued,base_tax:0118#: field:l10n.es.aeat.mod340.issued,base_tax:0
119#: field:l10n.es.aeat.mod340.received,base_tax:0119#: field:l10n.es.aeat.mod340.received,base_tax:0
120#: field:l10n.es.aeat.mod340.tax_line_intra,base_amount:0
121#: field:l10n.es.aeat.mod340.tax_line_investment,base_amount:0
120#: field:l10n.es.aeat.mod340.tax_line_issued,base_amount:0122#: field:l10n.es.aeat.mod340.tax_line_issued,base_amount:0
121#: field:l10n.es.aeat.mod340.tax_line_received,base_amount:0123#: field:l10n.es.aeat.mod340.tax_line_received,base_amount:0
122msgid "Base tax bill"124msgid "Base tax bill"
@@ -129,9 +131,7 @@
129131
130#. module: l10n_es_aeat_mod340132#. module: l10n_es_aeat_mod340
131#: report:report mod340:0133#: report:report mod340:0
132#: report:report_mod340:0
133#: report:vat book:0134#: report:vat book:0
134#: report:vat_book:0
135msgid "Apellidos y nombre de contacto:"135msgid "Apellidos y nombre de contacto:"
136msgstr "Apellidos y nombre de contacto:"136msgstr "Apellidos y nombre de contacto:"
137137
@@ -142,7 +142,6 @@
142142
143#. module: l10n_es_aeat_mod340143#. module: l10n_es_aeat_mod340
144#: field:account.tax.code,mod340:0144#: field:account.tax.code,mod340:0
145#: field:account.tax.code.template,mod340:0
146msgid "Include in mod340"145msgid "Include in mod340"
147msgstr "Incluir en el modelo 340"146msgstr "Incluir en el modelo 340"
148147
@@ -177,13 +176,11 @@
177msgstr "6 - Otro documento probatorio"176msgstr "6 - Otro documento probatorio"
178177
179#. module: l10n_es_aeat_mod340178#. module: l10n_es_aeat_mod340
180#: code:addons/l10n_es_aeat_mod340/wizard/export_mod340_to_boe.py:283179#: code:addons/l10n_es_aeat_mod340/wizard/export_mod340_to_boe.py:291
180#: code:addons/l10n_es_aeat_mod340/wizard/export_mod340_to_boe.py:529
181#, python-format181#, python-format
182msgid ""182msgid "The type 2 issued record must be 500 characters long for each Vat registry"
183"The type 2 issued record must be 500 characters long for each Vat registry"183msgstr "El registro de tipo 2 debe tener una longitud de 500 caracteres por cada registro de IVA"
184msgstr ""
185"El registro de tipo 2 debe tener una longitud de 500 caracteres por cada "
186"registro de IVA"
187184
188#. module: l10n_es_aeat_mod340185#. module: l10n_es_aeat_mod340
189#: field:l10n.es.aeat.mod340.report,period_from:0186#: field:l10n.es.aeat.mod340.report,period_from:0
@@ -191,24 +188,21 @@
191msgstr "Periodo inicial"188msgstr "Periodo inicial"
192189
193#. module: l10n_es_aeat_mod340190#. module: l10n_es_aeat_mod340
194#: code:addons/l10n_es_aeat_mod340/account.py:170191#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_report
195#, python-format192#: field:l10n.es.aeat.mod340.intracomunitarias,mod340_id:0
196msgid "Updated tax code %s.\n"193#: field:l10n.es.aeat.mod340.investment,mod340_id:0
197msgstr "Código de impuesto %s actualizado.\n"194#: field:l10n.es.aeat.mod340.issued,mod340_id:0
195#: field:l10n.es.aeat.mod340.received,mod340_id:0
196#: view:l10n.es.aeat.mod340.report:0
197msgid "Model 340"
198msgstr "Modelo 340"
198199
199#. module: l10n_es_aeat_mod340200#. module: l10n_es_aeat_mod340
200#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_intracomunitarias201#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_intracomunitarias
201#: field:l10n.es.aeat.mod340.report,intracomunitarias:0
202msgid "Operations Intracomunitarias"202msgid "Operations Intracomunitarias"
203msgstr "Operaciones intracomunitarias"203msgstr "Operaciones intracomunitarias"
204204
205#. module: l10n_es_aeat_mod340205#. module: l10n_es_aeat_mod340
206#: field:l10n.es.aeat.mod340.tax_line_issued,tax_amount:0
207#: field:l10n.es.aeat.mod340.tax_line_received,tax_amount:0
208msgid "Tax amount"
209msgstr "Impuestos"
210
211#. module: l10n_es_aeat_mod340
212#: view:l10n.es.aeat.mod340.report:0206#: view:l10n.es.aeat.mod340.report:0
213#: field:l10n.es.aeat.mod340.report,ean13:0207#: field:l10n.es.aeat.mod340.report,ean13:0
214msgid "Electronic Code VAT reverse charge"208msgid "Electronic Code VAT reverse charge"
@@ -220,35 +214,20 @@
220msgstr "Periodo final"214msgstr "Periodo final"
221215
222#. module: l10n_es_aeat_mod340216#. module: l10n_es_aeat_mod340
223#: code:addons/l10n_es_aeat_mod340/account.py:98
224#, python-format
225msgid "The Mod 340 field is different.\n"
226msgstr "El campo Mod 340 es diferente.\n"
227
228#. module: l10n_es_aeat_mod340
229#: view:l10n.es.aeat.mod340.report:0217#: view:l10n.es.aeat.mod340.report:0
230msgid "Identification"218msgid "Identification"
231msgstr "Identificación"219msgstr "Identificación"
232220
233#. module: l10n_es_aeat_mod340221#. module: l10n_es_aeat_mod340
234#: view:l10n.es.aeat.mod340.report:0222#: view:l10n.es.aeat.mod340.intracomunitarias:0
235msgid "295"223#: view:l10n.es.aeat.mod340.investment:0
236msgstr "295"
237
238#. module: l10n_es_aeat_mod340
239#: view:l10n.es.aeat.mod340.issued:0224#: view:l10n.es.aeat.mod340.issued:0
240#: view:l10n.es.aeat.mod340.received:0225#: view:l10n.es.aeat.mod340.received:0
241msgid "Total Tax"226msgid "Total Tax"
242msgstr "Total Impuestos"227msgstr "Cuota"
243
244#. module: l10n_es_aeat_mod340
245#: model:ir.actions.report.xml,name:l10n_es_aeat_mod340.report_mod340_action
246msgid "mod340 report"
247msgstr "mod340 report"
248228
249#. module: l10n_es_aeat_mod340229#. module: l10n_es_aeat_mod340
250#: report:vat book:0230#: report:vat book:0
251#: report:vat_book:0
252msgid "LIBRO DE IVA"231msgid "LIBRO DE IVA"
253msgstr "LIBRO DE IVA"232msgstr "LIBRO DE IVA"
254233
@@ -258,10 +237,42 @@
258msgstr "Facturas"237msgstr "Facturas"
259238
260#. module: l10n_es_aeat_mod340239#. module: l10n_es_aeat_mod340
261#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:66240#: field:l10n.es.aeat.mod340.tax_line_intra,tax_amount:0
262#, python-format241#: field:l10n.es.aeat.mod340.tax_line_investment,tax_amount:0
263msgid "This company dont have NIF"242#: field:l10n.es.aeat.mod340.tax_line_issued,tax_amount:0
264msgstr "Esta compañía no tiene CIF/NIF"243#: field:l10n.es.aeat.mod340.tax_line_received,tax_amount:0
244msgid "Tax amount"
245msgstr "Cuota"
246
247#. module: l10n_es_aeat_mod340
248#: field:account.tax,ledger_key:0
249#: field:account.tax,ledger_key_in:0
250#: field:account.tax,ledger_key_out:0
251#: field:account.tax.template,ledger_key:0
252#: field:l10n.es.aeat.mod340.intracomunitarias,ledger_key:0
253#: field:l10n.es.aeat.mod340.investment,ledger_key:0
254#: field:l10n.es.aeat.mod340.issued,ledger_key:0
255#: field:l10n.es.aeat.mod340.received,ledger_key:0
256msgid "Ledger Key"
257msgstr "Clave de libro"
258
259#. module: l10n_es_aeat_mod340
260#: field:l10n.es.aeat.mod340.tax_line_intra,surcharge_percentage:0
261#: field:l10n.es.aeat.mod340.tax_line_investment,surcharge_percentage:0
262#: field:l10n.es.aeat.mod340.tax_line_issued,surcharge_percentage:0
263#: field:l10n.es.aeat.mod340.tax_line_received,surcharge_percentage:0
264msgid "Surcharge percentage"
265msgstr "Tipo de recargo"
266
267#. module: l10n_es_aeat_mod340
268#: model:ir.model,name:l10n_es_aeat_mod340.model_account_tax
269msgid "Tax"
270msgstr "Impuesto"
271
272#. module: l10n_es_aeat_mod340
273#: view:l10n.es.aeat.mod340.report:0
274msgid "Fiscal Year"
275msgstr "Año fiscal"
265276
266#. module: l10n_es_aeat_mod340277#. module: l10n_es_aeat_mod340
267#: selection:res.partner,vat_type:0278#: selection:res.partner,vat_type:0
@@ -279,6 +290,11 @@
279msgstr "Estado"290msgstr "Estado"
280291
281#. module: l10n_es_aeat_mod340292#. module: l10n_es_aeat_mod340
293#: model:ir.model,name:l10n_es_aeat_mod340.model_account_tax_template
294msgid "Templates for Taxes"
295msgstr "Plantilla para los impuestos"
296
297#. module: l10n_es_aeat_mod340
282#: model:ir.ui.menu,name:l10n_es_aeat_mod340.menu_aeat_mod340_report298#: model:ir.ui.menu,name:l10n_es_aeat_mod340.menu_aeat_mod340_report
283msgid "AEAT 340 Model"299msgid "AEAT 340 Model"
284msgstr "Declaración AEAT 340"300msgstr "Declaración AEAT 340"
@@ -289,11 +305,10 @@
289#: field:l10n.es.aeat.mod340.issued,amount_tax:0305#: field:l10n.es.aeat.mod340.issued,amount_tax:0
290#: field:l10n.es.aeat.mod340.received,amount_tax:0306#: field:l10n.es.aeat.mod340.received,amount_tax:0
291msgid "Total tax"307msgid "Total tax"
292msgstr "Total impuestos"308msgstr "Cuota"
293309
294#. module: l10n_es_aeat_mod340310#. module: l10n_es_aeat_mod340
295#: report:vat book:0311#: report:vat book:0
296#: report:vat_book:0
297msgid "Nº de factura"312msgid "Nº de factura"
298msgstr "Nº de factura"313msgstr "Nº de factura"
299314
@@ -303,9 +318,19 @@
303#: field:l10n.es.aeat.mod340.issued,date_invoice:0318#: field:l10n.es.aeat.mod340.issued,date_invoice:0
304#: field:l10n.es.aeat.mod340.received,date_invoice:0319#: field:l10n.es.aeat.mod340.received,date_invoice:0
305msgid "Date Invoice"320msgid "Date Invoice"
306msgstr "Fecha Factura"321msgstr "Fecha factura"
307322
308#. module: l10n_es_aeat_mod340323#. module: l10n_es_aeat_mod340
324#: field:l10n.es.aeat.mod340.tax_line_intra,surcharge_amount:0
325#: field:l10n.es.aeat.mod340.tax_line_investment,surcharge_amount:0
326#: field:l10n.es.aeat.mod340.tax_line_issued,surcharge_amount:0
327#: field:l10n.es.aeat.mod340.tax_line_received,surcharge_amount:0
328msgid "Surcharge amount"
329msgstr "Cuota de recargo"
330
331#. module: l10n_es_aeat_mod340
332#: view:account.tax:0
333#: view:account.tax.template:0
309#: model:ir.actions.report.xml,name:l10n_es_aeat_mod340.report_mod340334#: model:ir.actions.report.xml,name:l10n_es_aeat_mod340.report_mod340
310msgid "Modelo 340"335msgid "Modelo 340"
311msgstr "Modelo 340"336msgstr "Modelo 340"
@@ -321,7 +346,7 @@
321msgstr "Tipo de soporte"346msgstr "Tipo de soporte"
322347
323#. module: l10n_es_aeat_mod340348#. module: l10n_es_aeat_mod340
324#: code:addons/l10n_es_aeat_mod340/wizard/export_mod340_to_boe.py:105349#: code:addons/l10n_es_aeat_mod340/wizard/export_mod340_to_boe.py:113
325#, python-format350#, python-format
326msgid "The period hasn't a valid Mod340 period"351msgid "The period hasn't a valid Mod340 period"
327msgstr "El periodo no es válido para el Módelo 340"352msgstr "El periodo no es válido para el Módelo 340"
@@ -337,32 +362,24 @@
337msgstr "1 - Corresponde a un NIF"362msgstr "1 - Corresponde a un NIF"
338363
339#. module: l10n_es_aeat_mod340364#. module: l10n_es_aeat_mod340
340#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_export_to_boe365#: code:addons/l10n_es_aeat_mod340/wizard/export_mod340_to_boe.py:134
341msgid "Export AEAT Model 340 to BOE format"
342msgstr "Exportar Modelo AEAT 340 al formato del BOE"
343
344#. module: l10n_es_aeat_mod340
345#: code:addons/l10n_es_aeat_mod340/wizard/export_mod340_to_boe.py:126
346#, python-format366#, python-format
347msgid "The type 1 record must be 500 characters long"367msgid "The type 1 record must be 500 characters long"
348msgstr "El registro de tipo 1 tiene que tener 500 caracteres de longitud"368msgstr "El registro de tipo 1 tiene que tener 500 caracteres de longitud"
349369
350#. module: l10n_es_aeat_mod340370#. module: l10n_es_aeat_mod340
351#: report:report mod340:0371#: report:report mod340:0
352#: report:report_mod340:0
353#: report:vat book:0372#: report:vat book:0
354#: report:vat_book:0
355msgid "CIF/NIF:"373msgid "CIF/NIF:"
356msgstr "CIF/NIF:"374msgstr "CIF/NIF:"
357375
358#. module: l10n_es_aeat_mod340376#. module: l10n_es_aeat_mod340
359#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_tax_line_issued377#: field:l10n.es.aeat.mod340.report,calculation_date:0
360msgid "Mod340 vat lines issued"378msgid "Calculation date"
361msgstr "Líneas de impuestos emitidos"379msgstr "Fecha de cálculo"
362380
363#. module: l10n_es_aeat_mod340381#. module: l10n_es_aeat_mod340
364#: report:report mod340:0382#: report:report mod340:0
365#: report:report_mod340:0
366msgid "CIF/NIF del representante legal:"383msgid "CIF/NIF del representante legal:"
367msgstr "CIF/NIF del representante legal:"384msgstr "CIF/NIF del representante legal:"
368385
@@ -376,21 +393,13 @@
376msgstr "Empresa"393msgstr "Empresa"
377394
378#. module: l10n_es_aeat_mod340395#. module: l10n_es_aeat_mod340
379#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:80
380#, python-format
381msgid "The periods selected don't belong to the fiscal year %s"
382msgstr "Los periodos seleccionados no pertenecen al año fiscal %s"
383
384#. module: l10n_es_aeat_mod340
385#: model:ir.actions.act_window,help:l10n_es_aeat_mod340.action_l10n_es_aeat_mod340_report396#: model:ir.actions.act_window,help:l10n_es_aeat_mod340.action_l10n_es_aeat_mod340_report
386msgid "Create and query AEAT Model 340 reports"397msgid "Create and query AEAT Model 340 reports"
387msgstr "Crear informe del Modelo AEAT 340"398msgstr "Crear informe del Modelo AEAT 340"
388399
389#. module: l10n_es_aeat_mod340400#. module: l10n_es_aeat_mod340
390#: report:report mod340:0401#: report:report mod340:0
391#: report:report_mod340:0
392#: report:vat book:0402#: report:vat book:0
393#: report:vat_book:0
394msgid "Cuota impuesto"403msgid "Cuota impuesto"
395msgstr "Cuota impuesto"404msgstr "Cuota impuesto"
396405
@@ -400,30 +409,42 @@
400msgstr "Líneas de impuestos recibidos"409msgstr "Líneas de impuestos recibidos"
401410
402#. module: l10n_es_aeat_mod340411#. module: l10n_es_aeat_mod340
412#: view:l10n.es.aeat.mod340.report:0
413msgid "Other intracommunity operations"
414msgstr "Otras opreaciones intracomunitarias"
415
416#. module: l10n_es_aeat_mod340
403#: report:report mod340:0417#: report:report mod340:0
404#: report:report_mod340:0
405msgid "MODELO AEAT 340"418msgid "MODELO AEAT 340"
406msgstr "MODELO AEAT 340"419msgstr "MODELO AEAT 340"
407420
408#. module: l10n_es_aeat_mod340421#. module: l10n_es_aeat_mod340
409#: code:addons/l10n_es_aeat_mod340/account.py:95422#: view:l10n.es.aeat.mod340.investment:0
410#, python-format423#: view:l10n.es.aeat.mod340.report:0
411msgid "The sign field is different.\n"424msgid "Investment goods"
412msgstr "El campo signo es diferente.\n"425msgstr "Bienes de inversión"
426
427#. module: l10n_es_aeat_mod340
428#: field:l10n.es.aeat.mod340.export_to_boe,state:0
429msgid "unknown"
430msgstr "unknown"
431
432#. module: l10n_es_aeat_mod340
433#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_tax_line_investment
434msgid "Mod340 vat lines investment"
435msgstr "Líneas de inversión del mod340"
413436
414#. module: l10n_es_aeat_mod340437#. module: l10n_es_aeat_mod340
415#: report:report mod340:0438#: report:report mod340:0
416#: report:report_mod340:0
417msgid "Tipo de declaración"439msgid "Tipo de declaración"
418msgstr "Tipo de declaración"440msgstr "Tipo de declaración"
419441
420#. module: l10n_es_aeat_mod340442#. module: l10n_es_aeat_mod340
421#: field:l10n.es.aeat.mod340.report,calculation_date:0443#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_tax_line_issued
422msgid "Calculation date"444msgid "Mod340 vat lines issued"
423msgstr "Fecha de cálculo"445msgstr "Líneas de impuestos emitidos"
424446
425#. module: l10n_es_aeat_mod340447#. module: l10n_es_aeat_mod340
426#: model:ir.actions.report.xml,name:l10n_es_aeat_mod340.report_vat_book_action
427#: model:ir.actions.report.xml,name:l10n_es_aeat_mod340.vat_book448#: model:ir.actions.report.xml,name:l10n_es_aeat_mod340.vat_book
428msgid "Vat Book"449msgid "Vat Book"
429msgstr "Libro de IVA"450msgstr "Libro de IVA"
@@ -434,10 +455,9 @@
434msgstr "Número de tiques"455msgstr "Número de tiques"
435456
436#. module: l10n_es_aeat_mod340457#. module: l10n_es_aeat_mod340
437#: code:addons/l10n_es_aeat_mod340/account.py:185458#: field:l10n.es.aeat.mod340.report,total_sharetax:0
438#, python-format459msgid "Total Share Tax"
439msgid "Tax code %s: The parent tax code %s can not be set.\n"460msgstr "Total impuestos"
440msgstr "Código de impuesto %s: el padre de %s no puede ser guardado.\n"
441461
442#. module: l10n_es_aeat_mod340462#. module: l10n_es_aeat_mod340
443#: selection:l10n.es.aeat.mod340.report,support_type:0463#: selection:l10n.es.aeat.mod340.report,support_type:0
@@ -446,9 +466,7 @@
446466
447#. module: l10n_es_aeat_mod340467#. module: l10n_es_aeat_mod340
448#: report:report mod340:0468#: report:report mod340:0
449#: report:report_mod340:0
450#: report:vat book:0469#: report:vat book:0
451#: report:vat_book:0
452msgid "Fecha"470msgid "Fecha"
453msgstr "Fecha"471msgstr "Fecha"
454472
@@ -458,15 +476,21 @@
458msgstr "En processo"476msgstr "En processo"
459477
460#. module: l10n_es_aeat_mod340478#. module: l10n_es_aeat_mod340
461#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340479#: field:l10n.es.aeat.mod340.investment,prorata:0
462#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_report480msgid "Definitive yearly prorata"
463#: field:l10n.es.aeat.mod340.intracomunitarias,mod340_id:0481msgstr "Prorrata anual definitiva"
464#: field:l10n.es.aeat.mod340.investment,mod340_id:0482
465#: field:l10n.es.aeat.mod340.issued,mod340_id:0483#. module: l10n_es_aeat_mod340
466#: field:l10n.es.aeat.mod340.received,mod340_id:0484#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:115
467#: view:l10n.es.aeat.mod340.report:0485#, python-format
468msgid "Model 340"486msgid "This company dont have NIF"
469msgstr "Modelo 340"487msgstr "Esta compañía no tiene CIF/NIF"
488
489#. module: l10n_es_aeat_mod340
490#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_received
491#: field:l10n.es.aeat.mod340.report,received:0
492msgid "Invoices Received"
493msgstr "Facturas recibidas"
470494
471#. module: l10n_es_aeat_mod340495#. module: l10n_es_aeat_mod340
472#: view:l10n.es.aeat.mod340.report:0496#: view:l10n.es.aeat.mod340.report:0
@@ -485,14 +509,15 @@
485msgstr "open"509msgstr "open"
486510
487#. module: l10n_es_aeat_mod340511#. module: l10n_es_aeat_mod340
488#: view:l10n.es.aeat.mod340.issued:0512#: code:addons/l10n_es_aeat_mod340/account.py:211
489#: view:l10n.es.aeat.mod340.received:0513#, python-format
490msgid "Total Base"514msgid "The ledger key is different.\n"
491msgstr "Total Base"515""
516msgstr "La clave de libro es diferente.\n"
517""
492518
493#. module: l10n_es_aeat_mod340519#. module: l10n_es_aeat_mod340
494#: report:report mod340:0520#: report:report mod340:0
495#: report:report_mod340:0
496msgid "Número de la declaración anterior:"521msgid "Número de la declaración anterior:"
497msgstr "Número de la declaración anterior:"522msgstr "Número de la declaración anterior:"
498523
@@ -512,19 +537,36 @@
512msgstr "Active si esta factura es un resumen de tiques"537msgstr "Active si esta factura es un resumen de tiques"
513538
514#. module: l10n_es_aeat_mod340539#. module: l10n_es_aeat_mod340
515#: field:l10n.es.aeat.mod340.export_to_boe,state:0540#: view:l10n.es.aeat.mod340.tax_line_investment:0
516msgid "unknown"541msgid "Tax line investment goods"
517msgstr "unknown"542msgstr "Línea de impuesto de bienes de inversión"
518543
519#. module: l10n_es_aeat_mod340544#. module: l10n_es_aeat_mod340
520#: field:l10n.es.aeat.mod340.report,contact_phone:0545#: report:report mod340:0
521msgid "Phone"546#: report:vat book:0
522msgstr "Teléfono"547msgid "Teléfono de contacto:"
523548msgstr "Teléfono de contacto:"
524#. module: l10n_es_aeat_mod340549
525#: field:account.invoice,last_ticket:0550#. module: l10n_es_aeat_mod340
526msgid "Last ticket"551#: field:l10n.es.aeat.mod340.tax_line_investment,goods_identification:0
527msgstr "Último tique"552msgid "Investment goods identification"
553msgstr "Identificación del bien"
554
555#. module: l10n_es_aeat_mod340
556#: field:l10n.es.aeat.mod340.investment,use_date:0
557msgid "Goods use start date"
558msgstr "Fecha de inicio de utilización"
559
560#. module: l10n_es_aeat_mod340
561#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:260
562#, python-format
563msgid "Invoice %s: Unable to determine the surcharged tax because it is not mapped in the partner's fiscal position %s"
564msgstr "Factura %s: No se pudo determinar el impuesto con recargo porque no está mapeado en la posición fiscal de la empresa %s"
565
566#. module: l10n_es_aeat_mod340
567#: view:l10n.es.aeat.mod340.tax_line_intra:0
568msgid "Tax line intracommunity"
569msgstr "Línea de impuesto intracomunitaria"
528570
529#. module: l10n_es_aeat_mod340571#. module: l10n_es_aeat_mod340
530#: field:l10n.es.aeat.mod340.report,previous_number:0572#: field:l10n.es.aeat.mod340.report,previous_number:0
@@ -538,13 +580,16 @@
538580
539#. module: l10n_es_aeat_mod340581#. module: l10n_es_aeat_mod340
540#: report:report mod340:0582#: report:report mod340:0
541#: report:report_mod340:0
542#: report:vat book:0583#: report:vat book:0
543#: report:vat_book:0
544msgid "Ejercicio fiscal:"584msgid "Ejercicio fiscal:"
545msgstr "Ejercicio fiscal:"585msgstr "Ejercicio fiscal:"
546586
547#. module: l10n_es_aeat_mod340587#. module: l10n_es_aeat_mod340
588#: field:account.invoice,last_ticket:0
589msgid "Last ticket"
590msgstr "Último tique"
591
592#. module: l10n_es_aeat_mod340
548#: field:l10n.es.aeat.mod340.intracomunitarias,partner_country_code:0593#: field:l10n.es.aeat.mod340.intracomunitarias,partner_country_code:0
549#: field:l10n.es.aeat.mod340.investment,partner_country_code:0594#: field:l10n.es.aeat.mod340.investment,partner_country_code:0
550#: field:l10n.es.aeat.mod340.issued,partner_country_code:0595#: field:l10n.es.aeat.mod340.issued,partner_country_code:0
@@ -573,12 +618,20 @@
573msgstr "Facturas emitidas"618msgstr "Facturas emitidas"
574619
575#. module: l10n_es_aeat_mod340620#. module: l10n_es_aeat_mod340
576#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:79621#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:58
622#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:86
623#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:125
624#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:259
577#, python-format625#, python-format
578msgid "Error"626msgid "Error"
579msgstr "Error"627msgstr "Error"
580628
581#. module: l10n_es_aeat_mod340629#. module: l10n_es_aeat_mod340
630#: view:l10n.es.aeat.mod340.report:0
631msgid "Susbtitutive/complementary declaration"
632msgstr "Declaración sustitutiva/complementaría"
633
634#. module: l10n_es_aeat_mod340
582#: field:l10n.es.aeat.mod340.intracomunitarias,representative_vat:0635#: field:l10n.es.aeat.mod340.intracomunitarias,representative_vat:0
583#: field:l10n.es.aeat.mod340.investment,representative_vat:0636#: field:l10n.es.aeat.mod340.investment,representative_vat:0
584#: field:l10n.es.aeat.mod340.issued,representative_vat:0637#: field:l10n.es.aeat.mod340.issued,representative_vat:0
@@ -598,14 +651,19 @@
598msgstr "Facturas emitidas"651msgstr "Facturas emitidas"
599652
600#. module: l10n_es_aeat_mod340653#. module: l10n_es_aeat_mod340
654#: view:l10n.es.aeat.mod340.intracomunitarias:0
655msgid "Other Intracommunity Operations"
656msgstr "Otras operaciones intracomunitarias"
657
658#. module: l10n_es_aeat_mod340
601#: report:report mod340:0659#: report:report mod340:0
602#: report:report_mod340:0
603#: report:vat book:0660#: report:vat book:0
604#: report:vat_book:0
605msgid "Base imponible"661msgid "Base imponible"
606msgstr "Base imponible"662msgstr "Base imponible"
607663
608#. module: l10n_es_aeat_mod340664#. module: l10n_es_aeat_mod340
665#: field:l10n.es.aeat.mod340.tax_line_intra,invoice_record_id:0
666#: field:l10n.es.aeat.mod340.tax_line_investment,invoice_record_id:0
609#: field:l10n.es.aeat.mod340.tax_line_received,invoice_record_id:0667#: field:l10n.es.aeat.mod340.tax_line_received,invoice_record_id:0
610msgid "Invoice received"668msgid "Invoice received"
611msgstr "Facturas recibidas"669msgstr "Facturas recibidas"
@@ -652,19 +710,17 @@
652710
653#. module: l10n_es_aeat_mod340711#. module: l10n_es_aeat_mod340
654#: report:report mod340:0712#: report:report mod340:0
655#: report:report_mod340:0
656#: report:vat book:0
657#: report:vat_book:0
658msgid "Teléfono de contacto:"
659msgstr "Teléfono de contacto:"
660
661#. module: l10n_es_aeat_mod340
662#: report:report mod340:0
663#: report:report_mod340:0
664msgid "Código electrónico autoliquidación IVA:"713msgid "Código electrónico autoliquidación IVA:"
665msgstr "Código electrónico autoliquidación IVA:"714msgstr "Código electrónico autoliquidación IVA:"
666715
667#. module: l10n_es_aeat_mod340716#. module: l10n_es_aeat_mod340
717#: help:account.tax,ledger_key:0
718#: help:account.tax,ledger_key_in:0
719#: help:account.tax,ledger_key_out:0
720msgid "Determines to which ledger the invoice with this tax will be assigned. Setting a value makes the tax to be accounted in 340 declaration"
721msgstr "Determina a qué libro se asignará una factura con este impuesto. Establecer un valor hace que el impuesto se tenga en cuenta en la declaración del modelo 340"
722
723#. module: l10n_es_aeat_mod340
668#: selection:res.partner,vat_type:0724#: selection:res.partner,vat_type:0
669msgid "5 - Certificado de residencia fiscal"725msgid "5 - Certificado de residencia fiscal"
670msgstr "5 - Certificado de residencia fiscal"726msgstr "5 - Certificado de residencia fiscal"
@@ -676,6 +732,8 @@
676msgstr "AEAT 340"732msgstr "AEAT 340"
677733
678#. module: l10n_es_aeat_mod340734#. module: l10n_es_aeat_mod340
735#: field:l10n.es.aeat.mod340.tax_line_intra,tax_percentage:0
736#: field:l10n.es.aeat.mod340.tax_line_investment,tax_percentage:0
679#: field:l10n.es.aeat.mod340.tax_line_issued,tax_percentage:0737#: field:l10n.es.aeat.mod340.tax_line_issued,tax_percentage:0
680#: field:l10n.es.aeat.mod340.tax_line_received,tax_percentage:0738#: field:l10n.es.aeat.mod340.tax_line_received,tax_percentage:0
681msgid "Tax percentage"739msgid "Tax percentage"
@@ -687,12 +745,16 @@
687msgstr "Facturas recibidas"745msgstr "Facturas recibidas"
688746
689#. module: l10n_es_aeat_mod340747#. module: l10n_es_aeat_mod340
748#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_tax_line_intra
749msgid "Mod340 vat lines intra-community"
750msgstr "Línea de impuesto intracomunitario del mod340"
751
752#. module: l10n_es_aeat_mod340
690#: help:l10n.es.aeat.mod340.report,number_records:0753#: help:l10n.es.aeat.mod340.report,number_records:0
691#: help:l10n.es.aeat.mod340.report,total:0754#: help:l10n.es.aeat.mod340.report,total:0
692#: help:l10n.es.aeat.mod340.report,total_sharetax:0755#: help:l10n.es.aeat.mod340.report,total_sharetax:0
693#: help:l10n.es.aeat.mod340.report,total_taxable:0756#: help:l10n.es.aeat.mod340.report,total_taxable:0
694msgid ""757msgid "The declaration will include partners with the total \n"
695"The declaration will include partners with the total \n"
696" of operations over this limit"758" of operations over this limit"
697msgstr "La declaración incluye las empresas que no superen este limite"759msgstr "La declaración incluye las empresas que no superen este limite"
698760
@@ -703,21 +765,15 @@
703765
704#. module: l10n_es_aeat_mod340766#. module: l10n_es_aeat_mod340
705#: report:report mod340:0767#: report:report mod340:0
706#: report:report_mod340:0
707#: report:vat book:0768#: report:vat book:0
708#: report:vat_book:0
709msgid "CIF/NIF"769msgid "CIF/NIF"
710msgstr "CIF/NIF"770msgstr "CIF/NIF"
711771
712#. module: l10n_es_aeat_mod340772#. module: l10n_es_aeat_mod340
713#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:196773#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:275
714#, python-format774#, python-format
715msgid ""775msgid "Invoice %s, Amount untaxed Lines %.2f do not correspond to AmountUntaxed on Invoice %.2f"
716"Invoice %s, Amount untaxed Lines %.2f do not correspond to AmountUntaxed on "776msgstr "Factura %s, el importe sin impuesto de las líneas %.2f no se corresponde con el importe sin impuesto de la factura %.2f"
717"Invoice %.2f"
718msgstr ""
719"Invoice %s, Amount untaxed Lines %.2f do not correspond to AmountUntaxed on "
720"Invoice %.2f"
721777
722#. module: l10n_es_aeat_mod340778#. module: l10n_es_aeat_mod340
723#: help:res.partner,vat_type:0779#: help:res.partner,vat_type:0
@@ -725,10 +781,13 @@
725msgstr "Clave número de identificación en el país de residencia. Modelo 340."781msgstr "Clave número de identificación en el país de residencia. Modelo 340."
726782
727#. module: l10n_es_aeat_mod340783#. module: l10n_es_aeat_mod340
784#: view:l10n.es.aeat.mod340.report:0
785msgid "322"
786msgstr "322"
787
788#. module: l10n_es_aeat_mod340
728#: report:report mod340:0789#: report:report mod340:0
729#: report:report_mod340:0
730#: report:vat book:0790#: report:vat book:0
731#: report:vat_book:0
732msgid "Número de factura"791msgid "Número de factura"
733msgstr "Número de factura"792msgstr "Número de factura"
734793
@@ -746,8 +805,17 @@
746msgstr "NIF del representante legal."805msgstr "NIF del representante legal."
747806
748#. module: l10n_es_aeat_mod340807#. module: l10n_es_aeat_mod340
808#: field:account.tax,operation_key:0
809#: field:account.tax.template,operation_key:0
810#: field:l10n.es.aeat.mod340.intracomunitarias,operation_key:0
811#: field:l10n.es.aeat.mod340.investment,operation_key:0
812#: field:l10n.es.aeat.mod340.issued,operation_key:0
813#: field:l10n.es.aeat.mod340.received,operation_key:0
814msgid "Operation Key"
815msgstr "Clave de operación"
816
817#. module: l10n_es_aeat_mod340
749#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_investment818#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_investment
750#: field:l10n.es.aeat.mod340.report,investment:0
751msgid "Property Investment"819msgid "Property Investment"
752msgstr "Inmovilizado"820msgstr "Inmovilizado"
753821
@@ -758,12 +826,13 @@
758826
759#. module: l10n_es_aeat_mod340827#. module: l10n_es_aeat_mod340
760#: report:report mod340:0828#: report:report mod340:0
761#: report:report_mod340:0
762msgid "Número:"829msgid "Número:"
763msgstr "Número:"830msgstr "Número:"
764831
765#. module: l10n_es_aeat_mod340832#. module: l10n_es_aeat_mod340
766#: field:l10n.es.aeat.mod340.report,name:0833#: field:l10n.es.aeat.mod340.report,name:0
834#: field:l10n.es.aeat.mod340.tax_line_intra,name:0
835#: field:l10n.es.aeat.mod340.tax_line_investment,name:0
767#: field:l10n.es.aeat.mod340.tax_line_issued,name:0836#: field:l10n.es.aeat.mod340.tax_line_issued,name:0
768#: field:l10n.es.aeat.mod340.tax_line_received,name:0837#: field:l10n.es.aeat.mod340.tax_line_received,name:0
769msgid "Name"838msgid "Name"
@@ -783,25 +852,33 @@
783msgstr "NIF del representante legal"852msgstr "NIF del representante legal"
784853
785#. module: l10n_es_aeat_mod340854#. module: l10n_es_aeat_mod340
855#: code:addons/l10n_es_aeat_mod340/account.py:208
856#, python-format
857msgid "The operation key is different.\n"
858""
859msgstr "La clave de operación es diferente.\n"
860""
861
862#. module: l10n_es_aeat_mod340
863#: field:l10n.es.aeat.mod340.report,investment:0
864msgid "Investment Goods"
865msgstr "Bienes de inversión"
866
867#. module: l10n_es_aeat_mod340
786#: report:report mod340:0868#: report:report mod340:0
787#: report:report_mod340:0
788msgid "Tipo de soporte:"869msgid "Tipo de soporte:"
789msgstr "Tipo de soporte:"870msgstr "Tipo de soporte:"
790871
791#. module: l10n_es_aeat_mod340872#. module: l10n_es_aeat_mod340
792#: field:l10n.es.aeat.mod340.report,attach_id:0
793msgid "BOE file"
794msgstr "Archivo BOE"
795
796#. module: l10n_es_aeat_mod340
797#: view:l10n.es.aeat.mod340.report:0873#: view:l10n.es.aeat.mod340.report:0
798msgid "Draft models"874msgid "Draft models"
799msgstr "Modelos en borrador"875msgstr "Modelos en borrador"
800876
801#. module: l10n_es_aeat_mod340877#. module: l10n_es_aeat_mod340
802#: view:l10n.es.aeat.mod340.report:0878#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:59
803msgid "Fiscal Year"879#, python-format
804msgstr "Año fiscal"880msgid "Invoice %s: Unable to determine the tax line %s source tax. The base code of the source tax may have been changed, please recompute the invoice taxes"
881msgstr "Factura %s: No se pudo determinar el impuesto origen de la línea de impuesto %s. El código de la base del impuesto origen puede haber sido cambiado, por favor recalcule los impuestos de la factura"
805882
806#. module: l10n_es_aeat_mod340883#. module: l10n_es_aeat_mod340
807#: view:account.invoice:0884#: view:account.invoice:0
@@ -809,16 +886,22 @@
809msgstr "Pagos"886msgstr "Pagos"
810887
811#. module: l10n_es_aeat_mod340888#. module: l10n_es_aeat_mod340
812#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_received889#: field:l10n.es.aeat.mod340.report,intracomunitarias:0
813#: field:l10n.es.aeat.mod340.report,received:0890msgid "Intra-community Operations"
814msgid "Invoices Received"891msgstr "Operaciones intracomunitarias"
815msgstr "Facturas recibidas"892
816893#. module: l10n_es_aeat_mod340
817#. module: l10n_es_aeat_mod340894#: sql_constraint:l10n.es.aeat.mod340.investment:0
818#: code:addons/l10n_es_aeat_mod340/account.py:92895msgid "The prorata must be between 0 and 100."
819#, python-format896msgstr "La prorrata debe estar entre 0 y 100."
820msgid "The info field is different.\n"897
821msgstr "El campo descripción es diferente.\n"898#. module: l10n_es_aeat_mod340
899#: view:l10n.es.aeat.mod340.intracomunitarias:0
900#: view:l10n.es.aeat.mod340.investment:0
901#: view:l10n.es.aeat.mod340.issued:0
902#: view:l10n.es.aeat.mod340.received:0
903msgid "Total Base"
904msgstr "Total Base"
822905
823#. module: l10n_es_aeat_mod340906#. module: l10n_es_aeat_mod340
824#: selection:l10n.es.aeat.mod340.report,support_type:0907#: selection:l10n.es.aeat.mod340.report,support_type:0
@@ -832,13 +915,16 @@
832915
833#. module: l10n_es_aeat_mod340916#. module: l10n_es_aeat_mod340
834#: report:report mod340:0917#: report:report mod340:0
835#: report:report_mod340:0
836#: report:vat book:0918#: report:vat book:0
837#: report:vat_book:0
838msgid "Empresa"919msgid "Empresa"
839msgstr "Empresa"920msgstr "Empresa"
840921
841#. module: l10n_es_aeat_mod340922#. module: l10n_es_aeat_mod340
923#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_export_to_boe
924msgid "Export Report to BOE Format"
925msgstr "Exportar a formato BOE"
926
927#. module: l10n_es_aeat_mod340
842#: selection:l10n.es.aeat.mod340.report,type:0928#: selection:l10n.es.aeat.mod340.report,type:0
843msgid "Complementary"929msgid "Complementary"
844msgstr "Complementaria"930msgstr "Complementaria"
@@ -850,9 +936,7 @@
850936
851#. module: l10n_es_aeat_mod340937#. module: l10n_es_aeat_mod340
852#: report:report mod340:0938#: report:report mod340:0
853#: report:report_mod340:0
854#: report:vat book:0939#: report:vat book:0
855#: report:vat_book:0
856msgid "Total factura"940msgid "Total factura"
857msgstr "Total factura"941msgstr "Total factura"
858942
@@ -862,15 +946,20 @@
862msgstr "Archivo"946msgstr "Archivo"
863947
864#. module: l10n_es_aeat_mod340948#. module: l10n_es_aeat_mod340
949#: view:account.tax:0
950msgid "onchange_type_tax_use(context)"
951msgstr "onchange_type_tax_use(context)"
952
953#. module: l10n_es_aeat_mod340
865#: report:report mod340:0954#: report:report mod340:0
866#: report:report_mod340:0
867#: report:vat book:0955#: report:vat book:0
868#: report:vat_book:0
869msgid "FACTURAS DE ENTRADA"956msgid "FACTURAS DE ENTRADA"
870msgstr "FACTURAS DE ENTRADA"957msgstr "FACTURAS DE ENTRADA"
871958
872#. module: l10n_es_aeat_mod340959#. module: l10n_es_aeat_mod340
960#: view:l10n.es.aeat.mod340.intracomunitarias:0
873#: field:l10n.es.aeat.mod340.intracomunitarias,total:0961#: field:l10n.es.aeat.mod340.intracomunitarias,total:0
962#: view:l10n.es.aeat.mod340.investment:0
874#: field:l10n.es.aeat.mod340.investment,total:0963#: field:l10n.es.aeat.mod340.investment,total:0
875#: view:l10n.es.aeat.mod340.issued:0964#: view:l10n.es.aeat.mod340.issued:0
876#: field:l10n.es.aeat.mod340.issued,total:0965#: field:l10n.es.aeat.mod340.issued,total:0
@@ -881,130 +970,8 @@
881msgstr "Total"970msgstr "Total"
882971
883#. module: l10n_es_aeat_mod340972#. module: l10n_es_aeat_mod340
884#: model:ir.model,name:l10n_es_aeat_mod340.model_account_tax_code_template973#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:167
885msgid "Tax Code Template"
886msgstr "Plantilla códigos de impuestos"
887
888#. module: l10n_es_aeat_mod340
889#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:118
890#, python-format974#, python-format
891msgid "La siguiente empresa no tiene asignado nif:"975msgid "La siguiente empresa no tiene asignado nif:"
892msgstr "La siguiente empresa no tiene asignado nif:"976msgstr "La siguiente empresa no tiene asignado nif:"
893977
894#~ msgid "May"
895#~ msgstr "Mayo"
896
897#~ msgid "June"
898#~ msgstr "Junio"
899
900#~ msgid "First quarter"
901#~ msgstr "Primer trimestre"
902
903#~ msgid "Third quarter"
904#~ msgstr "Tercer trimestre"
905
906#~ msgid "Second quarter"
907#~ msgstr "Segundo trimestre"
908
909#~ msgid "January"
910#~ msgstr "Enero"
911
912#~ msgid "Fourth quarter"
913#~ msgstr "Cuarto trimestre"
914
915#~ msgid "March"
916#~ msgstr "Marzo"
917
918#~ msgid "February"
919#~ msgstr "Febrero"
920
921#~ msgid "April"
922#~ msgstr "Abril"
923
924#~ msgid "August"
925#~ msgstr "Agosto"
926
927#~ msgid "September"
928#~ msgstr "Septiembre"
929
930#~ msgid "October"
931#~ msgstr "Octubre"
932
933#~ msgid "November"
934#~ msgstr "Noviembre"
935
936#~ msgid "December"
937#~ msgstr "Diciembre"
938
939#~ msgid "July"
940#~ msgstr "Julio"
941
942#, python-format
943#~ msgid "All real state records state code field must be filled."
944#~ msgstr ""
945#~ "Los registros de propiedades inmobiliarias deben ser rellenados manualmente."
946
947#~ msgid "Create and query AEAT Model 340 Reports"
948#~ msgstr "Crear informe del Model AEAT 340"
949
950#, python-format
951#~ msgid "Error!"
952#~ msgstr "Error!"
953
954#~ msgid "Confirm"
955#~ msgstr "Confirmar"
956
957#, python-format
958#~ msgid "340_report_%s.txt"
959#~ msgstr "340_report_%s.txt"
960
961#, python-format
962#~ msgid "%Y-%m-%d"
963#~ msgstr "%d-%m-%Y"
964
965#~ msgid "Export to BOE"
966#~ msgstr "Exportar al BOE"
967
968#, python-format
969#~ msgid "The periods selected don't belong to the fiscal year %s"
970#~ msgstr "Los periodos seleccionados no pertenecen al año fiscal %s"
971
972#~ msgid "Declaration Number"
973#~ msgstr "Número de declaración"
974
975#~ msgid "Canceled"
976#~ msgstr "Cancelado"
977
978#~ msgid "Calculate"
979#~ msgstr "Calcular"
980
981#, python-format
982#~ msgid "All partner state code field must be filled."
983#~ msgstr "Todos las empresas deben tener provincia."
984
985#, python-format
986#~ msgid "All partner vat number field must be filled."
987#~ msgstr "Todas las empresas deben tener CIF/NIF."
988
989#~ msgid "Processing"
990#~ msgstr "Procesando"
991
992#~ msgid "Cancel"
993#~ msgstr "Cancelar"
994
995#~ msgid "Recalculate"
996#~ msgstr "Recalcular"
997
998#~ msgid "AEAT Model 340"
999#~ msgstr "Modelo AEAT 340"
1000
1001#~ msgid ""
1002#~ "The declaration will include partners with the total of operations over this "
1003#~ "limit"
1004#~ msgstr "La declaración incluye las empresas que no superen este limite"
1005
1006#~ msgid "Previous Declaration Number"
1007#~ msgstr "Número de la declaración anterior"
1008
1009#~ msgid "Period"
1010#~ msgstr "Periodo"
1011978
=== modified file 'l10n_es_aeat_mod340/i18n/l10n_es_aeat_mod340.pot'
--- l10n_es_aeat_mod340/i18n/l10n_es_aeat_mod340.pot 2014-02-14 18:31:18 +0000
+++ l10n_es_aeat_mod340/i18n/l10n_es_aeat_mod340.pot 2014-06-01 16:57:08 +0000
@@ -4,10 +4,10 @@
4#4#
5msgid ""5msgid ""
6msgstr ""6msgstr ""
7"Project-Id-Version: OpenERP Server 7.0\n"7"Project-Id-Version: OpenERP Server 7.0-20140331-231318\n"
8"Report-Msgid-Bugs-To: \n"8"Report-Msgid-Bugs-To: \n"
9"POT-Creation-Date: 2014-02-02 18:10+0000\n"9"POT-Creation-Date: 2014-04-01 10:50+0000\n"
10"PO-Revision-Date: 2014-02-02 18:10+0000\n"10"PO-Revision-Date: 2014-04-01 10:50+0000\n"
11"Last-Translator: <>\n"11"Last-Translator: <>\n"
12"Language-Team: \n"12"Language-Team: \n"
13"MIME-Version: 1.0\n"13"MIME-Version: 1.0\n"
@@ -17,7 +17,7 @@
1717
18#. module: l10n_es_aeat_mod34018#. module: l10n_es_aeat_mod340
19#: report:report mod340:019#: report:report mod340:0
20#: report:vat_book:020#: report:vat book:0
21msgid "FACTURAS DE SALIDA"21msgid "FACTURAS DE SALIDA"
22msgstr ""22msgstr ""
2323
@@ -28,9 +28,7 @@
2828
29#. module: l10n_es_aeat_mod34029#. module: l10n_es_aeat_mod340
30#: report:report mod340:030#: report:report mod340:0
31#: report:report_mod340:0
32#: report:vat book:031#: report:vat book:0
33#: report:vat_book:0
34msgid "Compañía:"32msgid "Compañía:"
35msgstr ""33msgstr ""
3634
@@ -50,10 +48,13 @@
50msgstr ""48msgstr ""
5149
52#. module: l10n_es_aeat_mod34050#. module: l10n_es_aeat_mod340
53#: code:addons/l10n_es_aeat_mod340/account.py:8951#: help:l10n.es.aeat.mod340.report,investment_goods_prorating:0
54#, python-format52msgid "If checked, the investment goods invoices will be exported in their ledger. If not, they will be exported as received invoices"
55msgid "The code field is different.\n"53msgstr ""
56""54
55#. module: l10n_es_aeat_mod340
56#: field:l10n.es.aeat.mod340.report,investment_goods_prorating:0
57msgid "Investment goods prorating"
57msgstr ""58msgstr ""
5859
59#. module: l10n_es_aeat_mod34060#. module: l10n_es_aeat_mod340
@@ -67,15 +68,15 @@
67msgstr ""68msgstr ""
6869
69#. module: l10n_es_aeat_mod34070#. module: l10n_es_aeat_mod340
70#: code:addons/l10n_es_aeat_mod340/account.py:16171#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:126
71#, python-format72#, python-format
72msgid "Created tax code %s.\n"73msgid "The periods selected don't belong to the fiscal year %s"
73""
74msgstr ""74msgstr ""
7575
76#. module: l10n_es_aeat_mod34076#. module: l10n_es_aeat_mod340
77#: view:l10n.es.aeat.mod340.report:077#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:87
78msgid "Susbtitutive/complementary declaration"78#, python-format
79msgid "No match found for tax percentage %s"
79msgstr ""80msgstr ""
8081
81#. module: l10n_es_aeat_mod34082#. module: l10n_es_aeat_mod340
@@ -85,17 +86,12 @@
85msgstr ""86msgstr ""
8687
87#. module: l10n_es_aeat_mod34088#. module: l10n_es_aeat_mod340
88#: field:l10n.es.aeat.mod340.report,total_sharetax:0
89msgid "Total Share Tax"
90msgstr ""
91
92#. module: l10n_es_aeat_mod340
93#: field:l10n.es.aeat.mod340.report,number_records:089#: field:l10n.es.aeat.mod340.report,number_records:0
94msgid "Records"90msgid "Records"
95msgstr ""91msgstr ""
9692
97#. module: l10n_es_aeat_mod34093#. module: l10n_es_aeat_mod340
98#: code:addons/l10n_es_aeat_mod340/wizard/export_mod340_to_boe.py:39094#: code:addons/l10n_es_aeat_mod340/wizard/export_mod340_to_boe.py:411
99#, python-format95#, python-format
100msgid "The type 2 received record must be 500 characters long for each Vat registry"96msgid "The type 2 received record must be 500 characters long for each Vat registry"
101msgstr ""97msgstr ""
@@ -115,6 +111,8 @@
115#: field:l10n.es.aeat.mod340.investment,base_tax:0111#: field:l10n.es.aeat.mod340.investment,base_tax:0
116#: field:l10n.es.aeat.mod340.issued,base_tax:0112#: field:l10n.es.aeat.mod340.issued,base_tax:0
117#: field:l10n.es.aeat.mod340.received,base_tax:0113#: field:l10n.es.aeat.mod340.received,base_tax:0
114#: field:l10n.es.aeat.mod340.tax_line_intra,base_amount:0
115#: field:l10n.es.aeat.mod340.tax_line_investment,base_amount:0
118#: field:l10n.es.aeat.mod340.tax_line_issued,base_amount:0116#: field:l10n.es.aeat.mod340.tax_line_issued,base_amount:0
119#: field:l10n.es.aeat.mod340.tax_line_received,base_amount:0117#: field:l10n.es.aeat.mod340.tax_line_received,base_amount:0
120msgid "Base tax bill"118msgid "Base tax bill"
@@ -127,9 +125,7 @@
127125
128#. module: l10n_es_aeat_mod340126#. module: l10n_es_aeat_mod340
129#: report:report mod340:0127#: report:report mod340:0
130#: report:report_mod340:0
131#: report:vat book:0128#: report:vat book:0
132#: report:vat_book:0
133msgid "Apellidos y nombre de contacto:"129msgid "Apellidos y nombre de contacto:"
134msgstr ""130msgstr ""
135131
@@ -140,7 +136,6 @@
140136
141#. module: l10n_es_aeat_mod340137#. module: l10n_es_aeat_mod340
142#: field:account.tax.code,mod340:0138#: field:account.tax.code,mod340:0
143#: field:account.tax.code.template,mod340:0
144msgid "Include in mod340"139msgid "Include in mod340"
145msgstr ""140msgstr ""
146141
@@ -175,7 +170,8 @@
175msgstr ""170msgstr ""
176171
177#. module: l10n_es_aeat_mod340172#. module: l10n_es_aeat_mod340
178#: code:addons/l10n_es_aeat_mod340/wizard/export_mod340_to_boe.py:283173#: code:addons/l10n_es_aeat_mod340/wizard/export_mod340_to_boe.py:291
174#: code:addons/l10n_es_aeat_mod340/wizard/export_mod340_to_boe.py:529
179#, python-format175#, python-format
180msgid "The type 2 issued record must be 500 characters long for each Vat registry"176msgid "The type 2 issued record must be 500 characters long for each Vat registry"
181msgstr ""177msgstr ""
@@ -186,25 +182,21 @@
186msgstr ""182msgstr ""
187183
188#. module: l10n_es_aeat_mod340184#. module: l10n_es_aeat_mod340
189#: code:addons/l10n_es_aeat_mod340/account.py:170185#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_report
190#, python-format186#: field:l10n.es.aeat.mod340.intracomunitarias,mod340_id:0
191msgid "Updated tax code %s.\n"187#: field:l10n.es.aeat.mod340.investment,mod340_id:0
192""188#: field:l10n.es.aeat.mod340.issued,mod340_id:0
189#: field:l10n.es.aeat.mod340.received,mod340_id:0
190#: view:l10n.es.aeat.mod340.report:0
191msgid "Model 340"
193msgstr ""192msgstr ""
194193
195#. module: l10n_es_aeat_mod340194#. module: l10n_es_aeat_mod340
196#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_intracomunitarias195#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_intracomunitarias
197#: field:l10n.es.aeat.mod340.report,intracomunitarias:0
198msgid "Operations Intracomunitarias"196msgid "Operations Intracomunitarias"
199msgstr ""197msgstr ""
200198
201#. module: l10n_es_aeat_mod340199#. module: l10n_es_aeat_mod340
202#: field:l10n.es.aeat.mod340.tax_line_issued,tax_amount:0
203#: field:l10n.es.aeat.mod340.tax_line_received,tax_amount:0
204msgid "Tax amount"
205msgstr ""
206
207#. module: l10n_es_aeat_mod340
208#: view:l10n.es.aeat.mod340.report:0200#: view:l10n.es.aeat.mod340.report:0
209#: field:l10n.es.aeat.mod340.report,ean13:0201#: field:l10n.es.aeat.mod340.report,ean13:0
210msgid "Electronic Code VAT reverse charge"202msgid "Electronic Code VAT reverse charge"
@@ -216,36 +208,20 @@
216msgstr ""208msgstr ""
217209
218#. module: l10n_es_aeat_mod340210#. module: l10n_es_aeat_mod340
219#: code:addons/l10n_es_aeat_mod340/account.py:98
220#, python-format
221msgid "The Mod 340 field is different.\n"
222""
223msgstr ""
224
225#. module: l10n_es_aeat_mod340
226#: view:l10n.es.aeat.mod340.report:0211#: view:l10n.es.aeat.mod340.report:0
227msgid "Identification"212msgid "Identification"
228msgstr ""213msgstr ""
229214
230#. module: l10n_es_aeat_mod340215#. module: l10n_es_aeat_mod340
231#: view:l10n.es.aeat.mod340.report:0216#: view:l10n.es.aeat.mod340.intracomunitarias:0
232msgid "295"217#: view:l10n.es.aeat.mod340.investment:0
233msgstr ""
234
235#. module: l10n_es_aeat_mod340
236#: view:l10n.es.aeat.mod340.issued:0218#: view:l10n.es.aeat.mod340.issued:0
237#: view:l10n.es.aeat.mod340.received:0219#: view:l10n.es.aeat.mod340.received:0
238msgid "Total Tax"220msgid "Total Tax"
239msgstr ""221msgstr ""
240222
241#. module: l10n_es_aeat_mod340223#. module: l10n_es_aeat_mod340
242#: model:ir.actions.report.xml,name:l10n_es_aeat_mod340.report_mod340_action
243msgid "mod340 report"
244msgstr ""
245
246#. module: l10n_es_aeat_mod340
247#: report:vat book:0224#: report:vat book:0
248#: report:vat_book:0
249msgid "LIBRO DE IVA"225msgid "LIBRO DE IVA"
250msgstr ""226msgstr ""
251227
@@ -255,9 +231,41 @@
255msgstr ""231msgstr ""
256232
257#. module: l10n_es_aeat_mod340233#. module: l10n_es_aeat_mod340
258#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:66234#: field:l10n.es.aeat.mod340.tax_line_intra,tax_amount:0
259#, python-format235#: field:l10n.es.aeat.mod340.tax_line_investment,tax_amount:0
260msgid "This company dont have NIF"236#: field:l10n.es.aeat.mod340.tax_line_issued,tax_amount:0
237#: field:l10n.es.aeat.mod340.tax_line_received,tax_amount:0
238msgid "Tax amount"
239msgstr ""
240
241#. module: l10n_es_aeat_mod340
242#: field:account.tax,ledger_key:0
243#: field:account.tax,ledger_key_in:0
244#: field:account.tax,ledger_key_out:0
245#: field:account.tax.template,ledger_key:0
246#: field:l10n.es.aeat.mod340.intracomunitarias,ledger_key:0
247#: field:l10n.es.aeat.mod340.investment,ledger_key:0
248#: field:l10n.es.aeat.mod340.issued,ledger_key:0
249#: field:l10n.es.aeat.mod340.received,ledger_key:0
250msgid "Ledger Key"
251msgstr ""
252
253#. module: l10n_es_aeat_mod340
254#: field:l10n.es.aeat.mod340.tax_line_intra,surcharge_percentage:0
255#: field:l10n.es.aeat.mod340.tax_line_investment,surcharge_percentage:0
256#: field:l10n.es.aeat.mod340.tax_line_issued,surcharge_percentage:0
257#: field:l10n.es.aeat.mod340.tax_line_received,surcharge_percentage:0
258msgid "Surcharge percentage"
259msgstr ""
260
261#. module: l10n_es_aeat_mod340
262#: model:ir.model,name:l10n_es_aeat_mod340.model_account_tax
263msgid "Tax"
264msgstr ""
265
266#. module: l10n_es_aeat_mod340
267#: view:l10n.es.aeat.mod340.report:0
268msgid "Fiscal Year"
261msgstr ""269msgstr ""
262270
263#. module: l10n_es_aeat_mod340271#. module: l10n_es_aeat_mod340
@@ -276,6 +284,11 @@
276msgstr ""284msgstr ""
277285
278#. module: l10n_es_aeat_mod340286#. module: l10n_es_aeat_mod340
287#: model:ir.model,name:l10n_es_aeat_mod340.model_account_tax_template
288msgid "Templates for Taxes"
289msgstr ""
290
291#. module: l10n_es_aeat_mod340
279#: model:ir.ui.menu,name:l10n_es_aeat_mod340.menu_aeat_mod340_report292#: model:ir.ui.menu,name:l10n_es_aeat_mod340.menu_aeat_mod340_report
280msgid "AEAT 340 Model"293msgid "AEAT 340 Model"
281msgstr ""294msgstr ""
@@ -290,7 +303,6 @@
290303
291#. module: l10n_es_aeat_mod340304#. module: l10n_es_aeat_mod340
292#: report:vat book:0305#: report:vat book:0
293#: report:vat_book:0
294msgid "Nº de factura"306msgid "Nº de factura"
295msgstr ""307msgstr ""
296308
@@ -303,6 +315,16 @@
303msgstr ""315msgstr ""
304316
305#. module: l10n_es_aeat_mod340317#. module: l10n_es_aeat_mod340
318#: field:l10n.es.aeat.mod340.tax_line_intra,surcharge_amount:0
319#: field:l10n.es.aeat.mod340.tax_line_investment,surcharge_amount:0
320#: field:l10n.es.aeat.mod340.tax_line_issued,surcharge_amount:0
321#: field:l10n.es.aeat.mod340.tax_line_received,surcharge_amount:0
322msgid "Surcharge amount"
323msgstr ""
324
325#. module: l10n_es_aeat_mod340
326#: view:account.tax:0
327#: view:account.tax.template:0
306#: model:ir.actions.report.xml,name:l10n_es_aeat_mod340.report_mod340328#: model:ir.actions.report.xml,name:l10n_es_aeat_mod340.report_mod340
307msgid "Modelo 340"329msgid "Modelo 340"
308msgstr ""330msgstr ""
@@ -318,7 +340,7 @@
318msgstr ""340msgstr ""
319341
320#. module: l10n_es_aeat_mod340342#. module: l10n_es_aeat_mod340
321#: code:addons/l10n_es_aeat_mod340/wizard/export_mod340_to_boe.py:105343#: code:addons/l10n_es_aeat_mod340/wizard/export_mod340_to_boe.py:113
322#, python-format344#, python-format
323msgid "The period hasn't a valid Mod340 period"345msgid "The period hasn't a valid Mod340 period"
324msgstr ""346msgstr ""
@@ -334,32 +356,24 @@
334msgstr ""356msgstr ""
335357
336#. module: l10n_es_aeat_mod340358#. module: l10n_es_aeat_mod340
337#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_export_to_boe359#: code:addons/l10n_es_aeat_mod340/wizard/export_mod340_to_boe.py:134
338msgid "Export AEAT Model 340 to BOE format"
339msgstr ""
340
341#. module: l10n_es_aeat_mod340
342#: code:addons/l10n_es_aeat_mod340/wizard/export_mod340_to_boe.py:126
343#, python-format360#, python-format
344msgid "The type 1 record must be 500 characters long"361msgid "The type 1 record must be 500 characters long"
345msgstr ""362msgstr ""
346363
347#. module: l10n_es_aeat_mod340364#. module: l10n_es_aeat_mod340
348#: report:report mod340:0365#: report:report mod340:0
349#: report:report_mod340:0
350#: report:vat book:0366#: report:vat book:0
351#: report:vat_book:0
352msgid "CIF/NIF:"367msgid "CIF/NIF:"
353msgstr ""368msgstr ""
354369
355#. module: l10n_es_aeat_mod340370#. module: l10n_es_aeat_mod340
356#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_tax_line_issued371#: field:l10n.es.aeat.mod340.report,calculation_date:0
357msgid "Mod340 vat lines issued"372msgid "Calculation date"
358msgstr ""373msgstr ""
359374
360#. module: l10n_es_aeat_mod340375#. module: l10n_es_aeat_mod340
361#: report:report mod340:0376#: report:report mod340:0
362#: report:report_mod340:0
363msgid "CIF/NIF del representante legal:"377msgid "CIF/NIF del representante legal:"
364msgstr ""378msgstr ""
365379
@@ -373,21 +387,13 @@
373msgstr ""387msgstr ""
374388
375#. module: l10n_es_aeat_mod340389#. module: l10n_es_aeat_mod340
376#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:80
377#, python-format
378msgid "The periods selected don't belong to the fiscal year %s"
379msgstr ""
380
381#. module: l10n_es_aeat_mod340
382#: model:ir.actions.act_window,help:l10n_es_aeat_mod340.action_l10n_es_aeat_mod340_report390#: model:ir.actions.act_window,help:l10n_es_aeat_mod340.action_l10n_es_aeat_mod340_report
383msgid "Create and query AEAT Model 340 reports"391msgid "Create and query AEAT Model 340 reports"
384msgstr ""392msgstr ""
385393
386#. module: l10n_es_aeat_mod340394#. module: l10n_es_aeat_mod340
387#: report:report mod340:0395#: report:report mod340:0
388#: report:report_mod340:0
389#: report:vat book:0396#: report:vat book:0
390#: report:vat_book:0
391msgid "Cuota impuesto"397msgid "Cuota impuesto"
392msgstr ""398msgstr ""
393399
@@ -397,31 +403,42 @@
397msgstr ""403msgstr ""
398404
399#. module: l10n_es_aeat_mod340405#. module: l10n_es_aeat_mod340
406#: view:l10n.es.aeat.mod340.report:0
407msgid "Other intracommunity operations"
408msgstr ""
409
410#. module: l10n_es_aeat_mod340
400#: report:report mod340:0411#: report:report mod340:0
401#: report:report_mod340:0
402msgid "MODELO AEAT 340"412msgid "MODELO AEAT 340"
403msgstr ""413msgstr ""
404414
405#. module: l10n_es_aeat_mod340415#. module: l10n_es_aeat_mod340
406#: code:addons/l10n_es_aeat_mod340/account.py:95416#: view:l10n.es.aeat.mod340.investment:0
407#, python-format417#: view:l10n.es.aeat.mod340.report:0
408msgid "The sign field is different.\n"418msgid "Investment goods"
409""419msgstr ""
420
421#. module: l10n_es_aeat_mod340
422#: field:l10n.es.aeat.mod340.export_to_boe,state:0
423msgid "unknown"
424msgstr ""
425
426#. module: l10n_es_aeat_mod340
427#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_tax_line_investment
428msgid "Mod340 vat lines investment"
410msgstr ""429msgstr ""
411430
412#. module: l10n_es_aeat_mod340431#. module: l10n_es_aeat_mod340
413#: report:report mod340:0432#: report:report mod340:0
414#: report:report_mod340:0
415msgid "Tipo de declaración"433msgid "Tipo de declaración"
416msgstr ""434msgstr ""
417435
418#. module: l10n_es_aeat_mod340436#. module: l10n_es_aeat_mod340
419#: field:l10n.es.aeat.mod340.report,calculation_date:0437#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_tax_line_issued
420msgid "Calculation date"438msgid "Mod340 vat lines issued"
421msgstr ""439msgstr ""
422440
423#. module: l10n_es_aeat_mod340441#. module: l10n_es_aeat_mod340
424#: model:ir.actions.report.xml,name:l10n_es_aeat_mod340.report_vat_book_action
425#: model:ir.actions.report.xml,name:l10n_es_aeat_mod340.vat_book442#: model:ir.actions.report.xml,name:l10n_es_aeat_mod340.vat_book
426msgid "Vat Book"443msgid "Vat Book"
427msgstr ""444msgstr ""
@@ -432,10 +449,8 @@
432msgstr ""449msgstr ""
433450
434#. module: l10n_es_aeat_mod340451#. module: l10n_es_aeat_mod340
435#: code:addons/l10n_es_aeat_mod340/account.py:185452#: field:l10n.es.aeat.mod340.report,total_sharetax:0
436#, python-format453msgid "Total Share Tax"
437msgid "Tax code %s: The parent tax code %s can not be set.\n"
438""
439msgstr ""454msgstr ""
440455
441#. module: l10n_es_aeat_mod340456#. module: l10n_es_aeat_mod340
@@ -445,9 +460,7 @@
445460
446#. module: l10n_es_aeat_mod340461#. module: l10n_es_aeat_mod340
447#: report:report mod340:0462#: report:report mod340:0
448#: report:report_mod340:0
449#: report:vat book:0463#: report:vat book:0
450#: report:vat_book:0
451msgid "Fecha"464msgid "Fecha"
452msgstr ""465msgstr ""
453466
@@ -457,14 +470,20 @@
457msgstr ""470msgstr ""
458471
459#. module: l10n_es_aeat_mod340472#. module: l10n_es_aeat_mod340
460#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340473#: field:l10n.es.aeat.mod340.investment,prorata:0
461#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_report474msgid "Definitive yearly prorata"
462#: field:l10n.es.aeat.mod340.intracomunitarias,mod340_id:0475msgstr ""
463#: field:l10n.es.aeat.mod340.investment,mod340_id:0476
464#: field:l10n.es.aeat.mod340.issued,mod340_id:0477#. module: l10n_es_aeat_mod340
465#: field:l10n.es.aeat.mod340.received,mod340_id:0478#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:115
466#: view:l10n.es.aeat.mod340.report:0479#, python-format
467msgid "Model 340"480msgid "This company dont have NIF"
481msgstr ""
482
483#. module: l10n_es_aeat_mod340
484#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_received
485#: field:l10n.es.aeat.mod340.report,received:0
486msgid "Invoices Received"
468msgstr ""487msgstr ""
469488
470#. module: l10n_es_aeat_mod340489#. module: l10n_es_aeat_mod340
@@ -484,14 +503,14 @@
484msgstr ""503msgstr ""
485504
486#. module: l10n_es_aeat_mod340505#. module: l10n_es_aeat_mod340
487#: view:l10n.es.aeat.mod340.issued:0506#: code:addons/l10n_es_aeat_mod340/account.py:211
488#: view:l10n.es.aeat.mod340.received:0507#, python-format
489msgid "Total Base"508msgid "The ledger key is different.\n"
509""
490msgstr ""510msgstr ""
491511
492#. module: l10n_es_aeat_mod340512#. module: l10n_es_aeat_mod340
493#: report:report mod340:0513#: report:report mod340:0
494#: report:report_mod340:0
495msgid "Número de la declaración anterior:"514msgid "Número de la declaración anterior:"
496msgstr ""515msgstr ""
497516
@@ -511,18 +530,35 @@
511msgstr ""530msgstr ""
512531
513#. module: l10n_es_aeat_mod340532#. module: l10n_es_aeat_mod340
514#: field:l10n.es.aeat.mod340.export_to_boe,state:0533#: view:l10n.es.aeat.mod340.tax_line_investment:0
515msgid "unknown"534msgid "Tax line investment goods"
516msgstr ""535msgstr ""
517536
518#. module: l10n_es_aeat_mod340537#. module: l10n_es_aeat_mod340
519#: field:l10n.es.aeat.mod340.report,contact_phone:0538#: report:report mod340:0
520msgid "Phone"539#: report:vat book:0
521msgstr ""540msgid "Teléfono de contacto:"
522541msgstr ""
523#. module: l10n_es_aeat_mod340542
524#: field:account.invoice,last_ticket:0543#. module: l10n_es_aeat_mod340
525msgid "Last ticket"544#: field:l10n.es.aeat.mod340.tax_line_investment,goods_identification:0
545msgid "Investment goods identification"
546msgstr ""
547
548#. module: l10n_es_aeat_mod340
549#: field:l10n.es.aeat.mod340.investment,use_date:0
550msgid "Goods use start date"
551msgstr ""
552
553#. module: l10n_es_aeat_mod340
554#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:260
555#, python-format
556msgid "Invoice %s: Unable to determine the surcharged tax because it is not mapped in the partner's fiscal position %s"
557msgstr ""
558
559#. module: l10n_es_aeat_mod340
560#: view:l10n.es.aeat.mod340.tax_line_intra:0
561msgid "Tax line intracommunity"
526msgstr ""562msgstr ""
527563
528#. module: l10n_es_aeat_mod340564#. module: l10n_es_aeat_mod340
@@ -537,13 +573,16 @@
537573
538#. module: l10n_es_aeat_mod340574#. module: l10n_es_aeat_mod340
539#: report:report mod340:0575#: report:report mod340:0
540#: report:report_mod340:0
541#: report:vat book:0576#: report:vat book:0
542#: report:vat_book:0
543msgid "Ejercicio fiscal:"577msgid "Ejercicio fiscal:"
544msgstr ""578msgstr ""
545579
546#. module: l10n_es_aeat_mod340580#. module: l10n_es_aeat_mod340
581#: field:account.invoice,last_ticket:0
582msgid "Last ticket"
583msgstr ""
584
585#. module: l10n_es_aeat_mod340
547#: field:l10n.es.aeat.mod340.intracomunitarias,partner_country_code:0586#: field:l10n.es.aeat.mod340.intracomunitarias,partner_country_code:0
548#: field:l10n.es.aeat.mod340.investment,partner_country_code:0587#: field:l10n.es.aeat.mod340.investment,partner_country_code:0
549#: field:l10n.es.aeat.mod340.issued,partner_country_code:0588#: field:l10n.es.aeat.mod340.issued,partner_country_code:0
@@ -572,12 +611,20 @@
572msgstr ""611msgstr ""
573612
574#. module: l10n_es_aeat_mod340613#. module: l10n_es_aeat_mod340
575#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:79614#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:58
615#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:86
616#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:125
617#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:259
576#, python-format618#, python-format
577msgid "Error"619msgid "Error"
578msgstr ""620msgstr ""
579621
580#. module: l10n_es_aeat_mod340622#. module: l10n_es_aeat_mod340
623#: view:l10n.es.aeat.mod340.report:0
624msgid "Susbtitutive/complementary declaration"
625msgstr ""
626
627#. module: l10n_es_aeat_mod340
581#: field:l10n.es.aeat.mod340.intracomunitarias,representative_vat:0628#: field:l10n.es.aeat.mod340.intracomunitarias,representative_vat:0
582#: field:l10n.es.aeat.mod340.investment,representative_vat:0629#: field:l10n.es.aeat.mod340.investment,representative_vat:0
583#: field:l10n.es.aeat.mod340.issued,representative_vat:0630#: field:l10n.es.aeat.mod340.issued,representative_vat:0
@@ -597,14 +644,19 @@
597msgstr ""644msgstr ""
598645
599#. module: l10n_es_aeat_mod340646#. module: l10n_es_aeat_mod340
647#: view:l10n.es.aeat.mod340.intracomunitarias:0
648msgid "Other Intracommunity Operations"
649msgstr ""
650
651#. module: l10n_es_aeat_mod340
600#: report:report mod340:0652#: report:report mod340:0
601#: report:report_mod340:0
602#: report:vat book:0653#: report:vat book:0
603#: report:vat_book:0
604msgid "Base imponible"654msgid "Base imponible"
605msgstr ""655msgstr ""
606656
607#. module: l10n_es_aeat_mod340657#. module: l10n_es_aeat_mod340
658#: field:l10n.es.aeat.mod340.tax_line_intra,invoice_record_id:0
659#: field:l10n.es.aeat.mod340.tax_line_investment,invoice_record_id:0
608#: field:l10n.es.aeat.mod340.tax_line_received,invoice_record_id:0660#: field:l10n.es.aeat.mod340.tax_line_received,invoice_record_id:0
609msgid "Invoice received"661msgid "Invoice received"
610msgstr ""662msgstr ""
@@ -651,19 +703,17 @@
651703
652#. module: l10n_es_aeat_mod340704#. module: l10n_es_aeat_mod340
653#: report:report mod340:0705#: report:report mod340:0
654#: report:report_mod340:0
655#: report:vat book:0
656#: report:vat_book:0
657msgid "Teléfono de contacto:"
658msgstr ""
659
660#. module: l10n_es_aeat_mod340
661#: report:report mod340:0
662#: report:report_mod340:0
663msgid "Código electrónico autoliquidación IVA:"706msgid "Código electrónico autoliquidación IVA:"
664msgstr ""707msgstr ""
665708
666#. module: l10n_es_aeat_mod340709#. module: l10n_es_aeat_mod340
710#: help:account.tax,ledger_key:0
711#: help:account.tax,ledger_key_in:0
712#: help:account.tax,ledger_key_out:0
713msgid "Determines to which ledger the invoice with this tax will be assigned. Setting a value makes the tax to be accounted in 340 declaration"
714msgstr ""
715
716#. module: l10n_es_aeat_mod340
667#: selection:res.partner,vat_type:0717#: selection:res.partner,vat_type:0
668msgid "5 - Certificado de residencia fiscal"718msgid "5 - Certificado de residencia fiscal"
669msgstr ""719msgstr ""
@@ -675,6 +725,8 @@
675msgstr ""725msgstr ""
676726
677#. module: l10n_es_aeat_mod340727#. module: l10n_es_aeat_mod340
728#: field:l10n.es.aeat.mod340.tax_line_intra,tax_percentage:0
729#: field:l10n.es.aeat.mod340.tax_line_investment,tax_percentage:0
678#: field:l10n.es.aeat.mod340.tax_line_issued,tax_percentage:0730#: field:l10n.es.aeat.mod340.tax_line_issued,tax_percentage:0
679#: field:l10n.es.aeat.mod340.tax_line_received,tax_percentage:0731#: field:l10n.es.aeat.mod340.tax_line_received,tax_percentage:0
680msgid "Tax percentage"732msgid "Tax percentage"
@@ -686,6 +738,11 @@
686msgstr ""738msgstr ""
687739
688#. module: l10n_es_aeat_mod340740#. module: l10n_es_aeat_mod340
741#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_tax_line_intra
742msgid "Mod340 vat lines intra-community"
743msgstr ""
744
745#. module: l10n_es_aeat_mod340
689#: help:l10n.es.aeat.mod340.report,number_records:0746#: help:l10n.es.aeat.mod340.report,number_records:0
690#: help:l10n.es.aeat.mod340.report,total:0747#: help:l10n.es.aeat.mod340.report,total:0
691#: help:l10n.es.aeat.mod340.report,total_sharetax:0748#: help:l10n.es.aeat.mod340.report,total_sharetax:0
@@ -701,14 +758,12 @@
701758
702#. module: l10n_es_aeat_mod340759#. module: l10n_es_aeat_mod340
703#: report:report mod340:0760#: report:report mod340:0
704#: report:report_mod340:0
705#: report:vat book:0761#: report:vat book:0
706#: report:vat_book:0
707msgid "CIF/NIF"762msgid "CIF/NIF"
708msgstr ""763msgstr ""
709764
710#. module: l10n_es_aeat_mod340765#. module: l10n_es_aeat_mod340
711#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:196766#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:275
712#, python-format767#, python-format
713msgid "Invoice %s, Amount untaxed Lines %.2f do not correspond to AmountUntaxed on Invoice %.2f"768msgid "Invoice %s, Amount untaxed Lines %.2f do not correspond to AmountUntaxed on Invoice %.2f"
714msgstr ""769msgstr ""
@@ -719,10 +774,13 @@
719msgstr ""774msgstr ""
720775
721#. module: l10n_es_aeat_mod340776#. module: l10n_es_aeat_mod340
777#: view:l10n.es.aeat.mod340.report:0
778msgid "322"
779msgstr ""
780
781#. module: l10n_es_aeat_mod340
722#: report:report mod340:0782#: report:report mod340:0
723#: report:report_mod340:0
724#: report:vat book:0783#: report:vat book:0
725#: report:vat_book:0
726msgid "Número de factura"784msgid "Número de factura"
727msgstr ""785msgstr ""
728786
@@ -740,8 +798,17 @@
740msgstr ""798msgstr ""
741799
742#. module: l10n_es_aeat_mod340800#. module: l10n_es_aeat_mod340
801#: field:account.tax,operation_key:0
802#: field:account.tax.template,operation_key:0
803#: field:l10n.es.aeat.mod340.intracomunitarias,operation_key:0
804#: field:l10n.es.aeat.mod340.investment,operation_key:0
805#: field:l10n.es.aeat.mod340.issued,operation_key:0
806#: field:l10n.es.aeat.mod340.received,operation_key:0
807msgid "Operation Key"
808msgstr ""
809
810#. module: l10n_es_aeat_mod340
743#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_investment811#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_investment
744#: field:l10n.es.aeat.mod340.report,investment:0
745msgid "Property Investment"812msgid "Property Investment"
746msgstr ""813msgstr ""
747814
@@ -752,12 +819,13 @@
752819
753#. module: l10n_es_aeat_mod340820#. module: l10n_es_aeat_mod340
754#: report:report mod340:0821#: report:report mod340:0
755#: report:report_mod340:0
756msgid "Número:"822msgid "Número:"
757msgstr ""823msgstr ""
758824
759#. module: l10n_es_aeat_mod340825#. module: l10n_es_aeat_mod340
760#: field:l10n.es.aeat.mod340.report,name:0826#: field:l10n.es.aeat.mod340.report,name:0
827#: field:l10n.es.aeat.mod340.tax_line_intra,name:0
828#: field:l10n.es.aeat.mod340.tax_line_investment,name:0
761#: field:l10n.es.aeat.mod340.tax_line_issued,name:0829#: field:l10n.es.aeat.mod340.tax_line_issued,name:0
762#: field:l10n.es.aeat.mod340.tax_line_received,name:0830#: field:l10n.es.aeat.mod340.tax_line_received,name:0
763msgid "Name"831msgid "Name"
@@ -777,24 +845,31 @@
777msgstr ""845msgstr ""
778846
779#. module: l10n_es_aeat_mod340847#. module: l10n_es_aeat_mod340
848#: code:addons/l10n_es_aeat_mod340/account.py:208
849#, python-format
850msgid "The operation key is different.\n"
851""
852msgstr ""
853
854#. module: l10n_es_aeat_mod340
855#: field:l10n.es.aeat.mod340.report,investment:0
856msgid "Investment Goods"
857msgstr ""
858
859#. module: l10n_es_aeat_mod340
780#: report:report mod340:0860#: report:report mod340:0
781#: report:report_mod340:0
782msgid "Tipo de soporte:"861msgid "Tipo de soporte:"
783msgstr ""862msgstr ""
784863
785#. module: l10n_es_aeat_mod340864#. module: l10n_es_aeat_mod340
786#: field:l10n.es.aeat.mod340.report,attach_id:0
787msgid "BOE file"
788msgstr ""
789
790#. module: l10n_es_aeat_mod340
791#: view:l10n.es.aeat.mod340.report:0865#: view:l10n.es.aeat.mod340.report:0
792msgid "Draft models"866msgid "Draft models"
793msgstr ""867msgstr ""
794868
795#. module: l10n_es_aeat_mod340869#. module: l10n_es_aeat_mod340
796#: view:l10n.es.aeat.mod340.report:0870#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:59
797msgid "Fiscal Year"871#, python-format
872msgid "Invoice %s: Unable to determine the tax line %s source tax. The base code of the source tax may have been changed, please recompute the invoice taxes"
798msgstr ""873msgstr ""
799874
800#. module: l10n_es_aeat_mod340875#. module: l10n_es_aeat_mod340
@@ -803,16 +878,21 @@
803msgstr ""878msgstr ""
804879
805#. module: l10n_es_aeat_mod340880#. module: l10n_es_aeat_mod340
806#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_received881#: field:l10n.es.aeat.mod340.report,intracomunitarias:0
807#: field:l10n.es.aeat.mod340.report,received:0882msgid "Intra-community Operations"
808msgid "Invoices Received"883msgstr ""
809msgstr ""884
810885#. module: l10n_es_aeat_mod340
811#. module: l10n_es_aeat_mod340886#: sql_constraint:l10n.es.aeat.mod340.investment:0
812#: code:addons/l10n_es_aeat_mod340/account.py:92887msgid "The prorata must be between 0 and 100."
813#, python-format888msgstr ""
814msgid "The info field is different.\n"889
815""890#. module: l10n_es_aeat_mod340
891#: view:l10n.es.aeat.mod340.intracomunitarias:0
892#: view:l10n.es.aeat.mod340.investment:0
893#: view:l10n.es.aeat.mod340.issued:0
894#: view:l10n.es.aeat.mod340.received:0
895msgid "Total Base"
816msgstr ""896msgstr ""
817897
818#. module: l10n_es_aeat_mod340898#. module: l10n_es_aeat_mod340
@@ -827,13 +907,16 @@
827907
828#. module: l10n_es_aeat_mod340908#. module: l10n_es_aeat_mod340
829#: report:report mod340:0909#: report:report mod340:0
830#: report:report_mod340:0
831#: report:vat book:0910#: report:vat book:0
832#: report:vat_book:0
833msgid "Empresa"911msgid "Empresa"
834msgstr ""912msgstr ""
835913
836#. module: l10n_es_aeat_mod340914#. module: l10n_es_aeat_mod340
915#: model:ir.model,name:l10n_es_aeat_mod340.model_l10n_es_aeat_mod340_export_to_boe
916msgid "Export Report to BOE Format"
917msgstr ""
918
919#. module: l10n_es_aeat_mod340
837#: selection:l10n.es.aeat.mod340.report,type:0920#: selection:l10n.es.aeat.mod340.report,type:0
838msgid "Complementary"921msgid "Complementary"
839msgstr ""922msgstr ""
@@ -845,9 +928,7 @@
845928
846#. module: l10n_es_aeat_mod340929#. module: l10n_es_aeat_mod340
847#: report:report mod340:0930#: report:report mod340:0
848#: report:report_mod340:0
849#: report:vat book:0931#: report:vat book:0
850#: report:vat_book:0
851msgid "Total factura"932msgid "Total factura"
852msgstr ""933msgstr ""
853934
@@ -857,15 +938,20 @@
857msgstr ""938msgstr ""
858939
859#. module: l10n_es_aeat_mod340940#. module: l10n_es_aeat_mod340
941#: view:account.tax:0
942msgid "onchange_type_tax_use(context)"
943msgstr ""
944
945#. module: l10n_es_aeat_mod340
860#: report:report mod340:0946#: report:report mod340:0
861#: report:report_mod340:0
862#: report:vat book:0947#: report:vat book:0
863#: report:vat_book:0
864msgid "FACTURAS DE ENTRADA"948msgid "FACTURAS DE ENTRADA"
865msgstr ""949msgstr ""
866950
867#. module: l10n_es_aeat_mod340951#. module: l10n_es_aeat_mod340
952#: view:l10n.es.aeat.mod340.intracomunitarias:0
868#: field:l10n.es.aeat.mod340.intracomunitarias,total:0953#: field:l10n.es.aeat.mod340.intracomunitarias,total:0
954#: view:l10n.es.aeat.mod340.investment:0
869#: field:l10n.es.aeat.mod340.investment,total:0955#: field:l10n.es.aeat.mod340.investment,total:0
870#: view:l10n.es.aeat.mod340.issued:0956#: view:l10n.es.aeat.mod340.issued:0
871#: field:l10n.es.aeat.mod340.issued,total:0957#: field:l10n.es.aeat.mod340.issued,total:0
@@ -876,12 +962,7 @@
876msgstr ""962msgstr ""
877963
878#. module: l10n_es_aeat_mod340964#. module: l10n_es_aeat_mod340
879#: model:ir.model,name:l10n_es_aeat_mod340.model_account_tax_code_template965#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:167
880msgid "Tax Code Template"
881msgstr ""
882
883#. module: l10n_es_aeat_mod340
884#: code:addons/l10n_es_aeat_mod340/wizard/calculate_mod340_records.py:118
885#, python-format966#, python-format
886msgid "La siguiente empresa no tiene asignado nif:"967msgid "La siguiente empresa no tiene asignado nif:"
887msgstr ""968msgstr ""
888969
=== modified file 'l10n_es_aeat_mod340/mod340.py'
--- l10n_es_aeat_mod340/mod340.py 2014-02-24 14:45:52 +0000
+++ l10n_es_aeat_mod340/mod340.py 2014-06-01 16:57:08 +0000
@@ -27,12 +27,10 @@
2727
28from openerp.osv import orm, fields28from openerp.osv import orm, fields
29import time29import time
30from datetime import datetime30import netsvc
31from openerp import netsvc31import tools
32from openerp import tools32import pooler
33import math33
34from openerp.tools.translate import _
35from openerp import pooler
3634
37class l10n_es_aeat_mod340_report(orm.Model):35class l10n_es_aeat_mod340_report(orm.Model):
38 36
@@ -65,26 +63,34 @@
65 return result63 return result
66 64
67 def _get_number_records( self, cr, uid,ids, field_name, args,context ):65 def _get_number_records( self, cr, uid,ids, field_name, args,context ):
68 66 result = dict.fromkeys(ids,
69 result = {} 67 dict.fromkeys(['number_records','total_taxable','total_sharetax','total'], 0))
70 for id in ids:
71 result[id] = {}.fromkeys(
72 ['number_records','total_taxable','total_sharetax','total'],
73 0.0)
74 68
75 for model in self.browse(cr, uid, ids,context):69 for model in self.browse(cr, uid, ids,context):
7670
77 for issue in model.issued:71 for invoice_rec in model.issued:
78 result[model.id]['number_records'] += len( issue.tax_line_ids )72 result[model.id]['number_records'] += len( invoice_rec.tax_line_ids )
79 result[model.id]['total_taxable'] += issue.base_tax73 result[model.id]['total_taxable'] += invoice_rec.base_tax
80 result[model.id]['total_sharetax'] += issue.amount_tax74 result[model.id]['total_sharetax'] += invoice_rec.amount_tax
81 result[model.id]['total'] += issue.base_tax + issue.amount_tax75 result[model.id]['total'] += invoice_rec.base_tax + invoice_rec.amount_tax
8276
83 for issue in model.received:77 for invoice_rec in model.received:
84 result[model.id]['number_records'] += len( issue.tax_line_ids )78 result[model.id]['number_records'] += len( invoice_rec.tax_line_ids )
85 result[model.id]['total_taxable'] += issue.base_tax79 result[model.id]['total_taxable'] += invoice_rec.base_tax
86 result[model.id]['total_sharetax'] += issue.amount_tax80 result[model.id]['total_sharetax'] += invoice_rec.amount_tax
87 result[model.id]['total'] += issue.base_tax + issue.amount_tax81 result[model.id]['total'] += invoice_rec.base_tax + invoice_rec.amount_tax
82
83 for invoice_rec in model.investment:
84 result[model.id]['number_records'] += len( invoice_rec.tax_line_ids )
85 result[model.id]['total_taxable'] += invoice_rec.base_tax
86 result[model.id]['total_sharetax'] += invoice_rec.amount_tax
87 result[model.id]['total'] += invoice_rec.base_tax + invoice_rec.amount_tax
88
89 for invoice_rec in model.intracomunitarias:
90 result[model.id]['number_records'] += len( invoice_rec.tax_line_ids )
91 result[model.id]['total_taxable'] += invoice_rec.base_tax
92 result[model.id]['total_sharetax'] += invoice_rec.amount_tax
93 result[model.id]['total'] += invoice_rec.base_tax + invoice_rec.amount_tax
8894
89 return result95 return result
9096
@@ -96,8 +102,8 @@
96 size=64, string="Name"),102 size=64, string="Name"),
97 'declaration_number': fields.char("Declaration number", size=64,103 'declaration_number': fields.char("Declaration number", size=64,
98 readonly=True),104 readonly=True),
99 'phone_contact' : fields.char('Phone Contact',size=9),105 'phone_contact': fields.char('Phone Contact',size=9),
100 'name_contact' : fields.char('Name And Surname Contact',size=40),106 'name_contact': fields.char('Name And Surname Contact',size=40),
101 'period_from': fields.many2one('account.period', 'Start period',107 'period_from': fields.many2one('account.period', 'Start period',
102 states={'done': [('readonly', True)]}),108 states={'done': [('readonly', True)]}),
103 'period_to': fields.many2one('account.period', 'End period',109 'period_to': fields.many2one('account.period', 'End period',
@@ -109,14 +115,14 @@
109 'mod340_id','Invoices Received',115 'mod340_id','Invoices Received',
110 states={'done': [('readonly', True)]}),116 states={'done': [('readonly', True)]}),
111 'investment': fields.one2many('l10n.es.aeat.mod340.investment',117 'investment': fields.one2many('l10n.es.aeat.mod340.investment',
112 'mod340_id','Property Investment'),118 'mod340_id','Investment Goods'),
113 'intracomunitarias': fields.one2many(119 'intracomunitarias': fields.one2many(
114 'l10n.es.aeat.mod340.intracomunitarias',120 'l10n.es.aeat.mod340.intracomunitarias',
115 'mod340_id','Operations Intracomunitarias'),121 'mod340_id','Intra-community Operations'),
116 122
117 'ean13': fields.char('Electronic Code VAT reverse charge', size=16),123 'ean13': fields.char('Electronic Code VAT reverse charge', size=16),
118124
119 'total_taxable': fields.function(_get_number_records, method=True,125 'total_taxable': fields.function(_get_number_records, method=True,
120 type='float', string='Total Taxable', multi='recalc',126 type='float', string='Total Taxable', multi='recalc',
121 help="""The declaration will include partners with the total 127 help="""The declaration will include partners with the total
122 of operations over this limit"""),128 of operations over this limit"""),
@@ -132,12 +138,13 @@
132 type='float', string="Total", multi='recalc',138 type='float', string="Total", multi='recalc',
133 help="""The declaration will include partners with the total 139 help="""The declaration will include partners with the total
134 of operations over this limit"""),140 of operations over this limit"""),
135 'calculation_date': fields.date('Calculation date', readonly=True),141 'investment_goods_prorating': fields.boolean("Investment goods prorating",
142 help="If checked, the investment goods invoices will be exported in their ledger. If not, they will be exported as received invoices")
136 }143 }
137 _defaults = {144 _defaults = {
138 'number' : lambda *a: '340',145 'number': '340',
139 'declaration_number' : lambda *a: '340',146 'declaration_number': '340',
140 }147 }
141148
142 def set_done(self, cr, uid, id, *args):149 def set_done(self, cr, uid, id, *args):
143 self.write(cr,uid,id,{'calculation_date': time.strftime('%Y-%m-%d'),150 self.write(cr,uid,id,{'calculation_date': time.strftime('%Y-%m-%d'),
@@ -159,23 +166,70 @@
159class l10n_es_aeat_mod340_issued(orm.Model):166class l10n_es_aeat_mod340_issued(orm.Model):
160 _name = 'l10n.es.aeat.mod340.issued'167 _name = 'l10n.es.aeat.mod340.issued'
161 _description = 'Invoices invoice'168 _description = 'Invoices invoice'
169
170 def get_ledger_keys(self, cr, uid, context=None):
171 return [('E', u'E-Libro registro de facturas expedidas.'),
172 ('F', u'F-Libro registro de facturas expedidas IGIC.'),
173 ('U', u'U-Libro registro de determinadas operaciones intracomunitarias (envío).')]
174
175 def _get_ledger_keys(self, cr, uid, context=None):
176 return self.get_ledger_keys(cr, uid, context=context)
177
178 def get_operation_keys(self, cr, uid, context=None):
179 return [(' ', u'Operación habitual'),
180 ('A', u'A-Asiento resumen de facturas'),
181 ('B', u'B-Asiento resumen de tique'),
182 ('C', u'C-Factura con varios asientos (varios tipos impositivos)'),
183 ('D', u'D-Factura rectificativa'),
184 ('E', u'E-IVA/IGIC devengado pendiente de emitir factura'),
185 ('G', u'G-Régimen especial de grupo de entidades en IVA o IGIC'),
186 ('H', u'H-Régimen especial de oro de inversión'),
187 ('I', u'I-Inversión del Sujeto pasivo (ISP)'),
188 ('J', u'J-Tiques'),
189 ('K', u'K-Rectificación de errores registrales'),
190 ('M', u'M-IVA/IGIC facturado pendiente de devengar (emitida factura)'),
191 ('N', u'N-Facturación de las prestaciones de servicios de agencias de viaje que actúan como mediadoras en nombre y por cuenta ajena'),
192 ('O', u'O-Factura emitida en sustitución de tiques facturados y declarados'),
193 ('Q', u'Q-Operaciones a las que se aplique el Régimen especial de bienes usados, objetos de arte, antigüedades y objetos de colección'),
194 ('R', u'R-Operación de arrendamiento de local de negocio'),
195 ('S', u'S-Subvenciones, auxilios o ayudas satisfechas o recibidas, tanto por parte de Administraciones públicas como de entidades privadas'),
196 ('T', u'T-Cobros por cuenta de terceros de honorarios profesionales o de derechos derivados de la propiedad intelectual, industrial, de autor u otros por cuenta de sus socios, asociados o colegiados efectuados por sociedades, asociaciones, colegios profesionales u otras entidades que, entre sus funciones, realicen las de cobro'),
197 ('U', u'U-Operación de seguros'),
198 ('V', u'V-Compras de Agencias viajes'),
199 ('W', u'W-Operaciones sujetas al Impuesto sobre la Producción, los Servicios y la Importación en las Ciudades de Ceuta y Melilla'),
200 ('X', u'X-Operaciones por las que los empresarios o profesionales que satisfagan compensaciones agrícolas, ganaderas y/o pesqueras hayan expedido el recibo correspondiente'),
201 ('Z', u'Z-Régimen especial del criterio de caja'),
202 ('1', u'1-IVA criterio de caja. Asiento resumen de facturas'),
203 ('2', u'2-IVA criterio de caja. Factura con varios asientos (varios tipos impositivos)'),
204 ('3', u'3-IVA criterio de caja. Factura rectificativa'),
205 ('4', u'4-IVA criterio de caja. Adquisiciones realizadas por las agencias de viajes directamente en interés del viajero (Régimen especial de agencia de viajes)'),
206 ('5', u'5-IVA criterio de caja. Factura simplificada'),
207 ('6', u'6-IVA criterio de caja. Rectificación de errores registrales'),
208 ('7', u'7-IVA criterio de caja. Facturación de las prestaciones de servicios de agencias de viaje que actúan como mediadoras en nombre y por cuenta ajena. (Disposición adicional 4.ª RD 1496/2003)'),
209 ('8', u'8-IVA criterio de caja. Operación de arrendamiento de local de negocio.')]
210
211 def _get_operation_keys(self, cr, uid, context=None):
212 return self.get_operation_keys(cr, uid, context=context)
213
162 _columns = { 214 _columns = {
163 'mod340_id': fields.many2one('l10n.es.aeat.mod340.report','Model 340',215 'mod340_id': fields.many2one('l10n.es.aeat.mod340.report','Model 340',
164 ondelete="cascade"),216 ondelete="cascade"),
165 'partner_id':fields.many2one('res.partner','Partner',217 'partner_id': fields.many2one('res.partner','Partner',
166 ondelete="cascade"),218 ondelete="cascade"),
167 'partner_vat':fields.char('Company CIF/NIF',size=12),219 'partner_vat': fields.char('Company CIF/NIF',size=12),
168 'representative_vat': fields.char('L.R. VAT number', size=9,220 'representative_vat': fields.char('L.R. VAT number', size=9,
169 help="Legal Representative VAT number"),221 help="Legal Representative VAT number"),
170 'partner_country_code': fields.char('Country Code', size=2),222 'partner_country_code': fields.char('Country Code', size=2),
171 'invoice_id':fields.many2one('account.invoice','Invoice',223 'invoice_id':fields.many2one('account.invoice','Invoice',
172 ondelete="cascade"),224 ondelete="cascade"),
173 'base_tax':fields.float('Base tax bill',digits=(13,2)),225 'base_tax': fields.float('Base tax bill',digits=(13,2)),
174 'amount_tax':fields.float('Total tax',digits=(13,2)),226 'amount_tax': fields.float('Total tax',digits=(13,2)),
175 'total':fields.float('Total',digits=(13,2)),227 'total': fields.float('Total',digits=(13,2)),
176 'tax_line_ids': fields.one2many('l10n.es.aeat.mod340.tax_line_issued',228 'tax_line_ids': fields.one2many('l10n.es.aeat.mod340.tax_line_issued',
177 'invoice_record_id', 'Tax lines'),229 'invoice_record_id', 'Tax lines'),
178 'date_invoice': fields.date('Date Invoice', readonly=True),230 'date_invoice': fields.date('Date Invoice', readonly=True),
231 'ledger_key': fields.selection(_get_ledger_keys, 'Ledger Key', required=True, readonly=True),
232 'operation_key': fields.selection(_get_operation_keys, 'Operation Key', required=True, readonly=True),
179 }233 }
180 234
181 _order = 'date_invoice asc, invoice_id asc'235 _order = 'date_invoice asc, invoice_id asc'
@@ -184,20 +238,79 @@
184 _name = 'l10n.es.aeat.mod340.received'238 _name = 'l10n.es.aeat.mod340.received'
185 _description = 'Invoices Received'239 _description = 'Invoices Received'
186 _inherit = 'l10n.es.aeat.mod340.issued'240 _inherit = 'l10n.es.aeat.mod340.issued'
241
242 def get_ledger_keys(self, cr, uid, context=None):
243 return [('R', u'R-Libro registro de facturas recibidas.'),
244 ('I', u'I-Libro registro de bienes de inversión.'),
245 ('J', u'J-Libro de registro de bienes de inversión IGIC.'),
246 ('S', u'S-Libro de registro de facturas recibidas IGIC.'),
247 ('U', u'U-Libro registro de determinadas operaciones intracomunitarias (recepción).')]
248
249 def _get_ledger_keys(self, cr, uid, context=None):
250 return self.get_ledger_keys(cr, uid, context=context)
251
252 def get_operation_keys(self, cr, uid, context=None):
253 return [(' ', u'Operación habitual'),
254 ('A', u'A-Asiento resumen de facturas'),
255 ('B', u'B-Asiento resumen de tiques / facturas simplificadas'),
256 ('C', u'C-Factura con varios asientos(varios tipo impositivos)'),
257 ('D', u'D-Factura rectificativa'),
258 ('F', u'F-Adquisiciones realizadas por las agencias de viajes directamente en interés del viajero (Régimen especial de agencias de viajes)'),
259 ('G', u'G-Régimen especial de grupo de entidades en IVA o IGIC'),
260 ('H', u'H-Régimen especial de oro de inversión'),
261 ('I', u'I-Inversión del Sujeto pasivo (ISP)'),
262 ('J', u'J-Tiques / facturas simplificadas'),
263 ('K', u'K-Rectificación anotaciones registrales'),
264 ('L', u'L-Adquisiciones a comerciantes minoristas del IGIC'),
265 ('P', u'P-Adquisiciones intracomunitarias de bienes.'),
266 ('Q', u'Q-Operaciones a las que se aplique el régimen especial de bienes usados, ...'),
267 ('R', u'R-Operación de arrendamiento de local de negocio.'),
268 ('S', u'S-Subvenciones, auxilios o ayudas satisfechas o recibidas, tanto por parte de Administraciones públicas como de entidades privadas.'),
269 ('W', u'W-Operaciones sujetas al Impuesto sobre la Producción, los Servicios y la Importación en las Ciudades de Ceuta y Melilla.'),
270 ('X', u'X-Operaciones por las que los empresarios o profesionales que satisfagan compensaciones agrícolas, ganaderas y/o pesqueras hayan expedido el recibo correspondiente.'),
271 ('Z', u'Z-Régimen especial del criterio de caja.'),
272 ('1', u'1-IVA criterio de caja. Asiento resumen de facturas.'),
273 ('2', u'2-IVA criterio de caja. Factura con varios asientos (varios tipos impositivos).'),
274 ('3', u'3-IVA criterio de caja. Factura rectificativa.'),
275 ('4', u'4-IVA criterio de caja. Adquisiciones realizadas por las agencias de viajes directamente en interés del viajero (Régimen especial de agencias de viajes.'),
276 ('5', u'5-IVA criterio de caja. Factura simplificada.'),
277 ('6', u'6-IVA criterio de caja. Rectificación de errores registrales.'),
278 ('7', u'7-IVA criterio de caja. Facturación de las prestaciones de servicios de agencias de viaje que actúan como mediadoras en nombre y por cuenta ajena (Disposición adicional 4ª RD 1496/2003).'),
279 ('8', u'8-IVA criterio de caja. Operación de arrendamiento de local de negocio.')]
280
281 def _get_operation_keys(self, cr, uid, context=None):
282 return self.get_operation_keys(cr, uid, context=context)
283
187 _columns = {284 _columns = {
188 'tax_line_ids':fields.one2many('l10n.es.aeat.mod340.tax_line_received',285 'tax_line_ids': fields.one2many('l10n.es.aeat.mod340.tax_line_received',
189 'invoice_record_id', 'Tax lines'),286 'invoice_record_id', 'Tax lines'),
287 'ledger_key': fields.selection(_get_ledger_keys, 'Ledger Key', required=True, readonly=True),
288 'operation_key': fields.selection(_get_operation_keys, 'Operation Key', required=True),
190 }289 }
191290
192class l10n_es_aeat_mod340_investment(orm.Model):291class l10n_es_aeat_mod340_investment(orm.Model):
193 _name = 'l10n.es.aeat.mod340.investment'292 _name = 'l10n.es.aeat.mod340.investment'
194 _description = 'Property Investment'293 _description = 'Property Investment'
195 _inherit = 'l10n.es.aeat.mod340.issued'294 _inherit = 'l10n.es.aeat.mod340.received'
295
296 _columns = {
297 'tax_line_ids': fields.one2many('l10n.es.aeat.mod340.tax_line_investment',
298 'invoice_record_id', 'Tax lines'),
299 'use_date': fields.date("Goods use start date"),
300 'prorata': fields.integer("Definitive yearly prorata"),
301 }
302
303 _sql_constraints = [('prorata_range','check(prorata >= 0 and prorata <= 100)','The prorata must be between 0 and 100.')]
196304
197class l10n_es_aeat_mod340_intracomunitarias(orm.Model):305class l10n_es_aeat_mod340_intracomunitarias(orm.Model):
198 _name = 'l10n.es.aeat.mod340.intracomunitarias'306 _name = 'l10n.es.aeat.mod340.intracomunitarias'
199 _description = 'Operations Intracomunitarias'307 _description = 'Operations Intracomunitarias'
200 _inherit = 'l10n.es.aeat.mod340.issued'308 _inherit = 'l10n.es.aeat.mod340.issued'
309
310 _columns = {
311 'tax_line_ids': fields.one2many('l10n.es.aeat.mod340.tax_line_intra',
312 'invoice_record_id', 'Tax lines'),
313 }
201314
202class l10n_es_aeat_mod340_tax_line_issued(orm.Model):315class l10n_es_aeat_mod340_tax_line_issued(orm.Model):
203 _name = 'l10n.es.aeat.mod340.tax_line_issued'316 _name = 'l10n.es.aeat.mod340.tax_line_issued'
@@ -209,6 +322,8 @@
209 'base_amount': fields.float('Base tax bill',digits=(13,2)),322 'base_amount': fields.float('Base tax bill',digits=(13,2)),
210 'invoice_record_id': fields.many2one('l10n.es.aeat.mod340.issued',323 'invoice_record_id': fields.many2one('l10n.es.aeat.mod340.issued',
211 'Invoice issued', required=True, ondelete="cascade", select=1),324 'Invoice issued', required=True, ondelete="cascade", select=1),
325 'surcharge_percentage': fields.float('Surcharge percentage',digits=(0,2)),
326 'surcharge_amount': fields.float('Surcharge amount',digits=(13,2)),
212 }327 }
213328
214class l10n_es_aeat_mod340_tax_line_received(orm.Model):329class l10n_es_aeat_mod340_tax_line_received(orm.Model):
@@ -219,3 +334,24 @@
219 'invoice_record_id': fields.many2one('l10n.es.aeat.mod340.received',334 'invoice_record_id': fields.many2one('l10n.es.aeat.mod340.received',
220 'Invoice received', required=True, ondelete="cascade", select=1),335 'Invoice received', required=True, ondelete="cascade", select=1),
221 }336 }
337
338class l10n_es_aeat_mod340_tax_line_investment(orm.Model):
339 _name = 'l10n.es.aeat.mod340.tax_line_investment'
340 _description = 'Mod340 vat lines investment'
341 _inherit = 'l10n.es.aeat.mod340.tax_line_issued'
342 _columns = {
343 'invoice_record_id': fields.many2one('l10n.es.aeat.mod340.investment',
344 'Invoice received', required=True, ondelete="cascade", select=1),
345 'goods_identification': fields.char("Investment goods identification", size=17),
346 }
347
348
349
350class l10n_es_aeat_mod340_tax_line_intra(orm.Model):
351 _name = 'l10n.es.aeat.mod340.tax_line_intra'
352 _description = 'Mod340 vat lines intra-community'
353 _inherit = 'l10n.es.aeat.mod340.tax_line_issued'
354 _columns = {
355 'invoice_record_id': fields.many2one('l10n.es.aeat.mod340.intracomunitarias',
356 'Invoice received', required=True, ondelete="cascade", select=1),
357 }
222358
=== modified file 'l10n_es_aeat_mod340/mod340_view.xml'
--- l10n_es_aeat_mod340/mod340_view.xml 2014-03-20 00:33:19 +0000
+++ l10n_es_aeat_mod340/mod340_view.xml 2014-06-01 16:57:08 +0000
@@ -1,6 +1,7 @@
1<?xml version="1.0" encoding="utf-8"?>1<?xml version="1.0" encoding="utf-8"?>
2<openerp>2<openerp>
3 <data>3 <data>
4<<<<<<< TREE
4 <!-- Modelo 340 -->5 <!-- Modelo 340 -->
5 <record model="ir.ui.view" id="view_l10n_es_aeat_mod340_tree">6 <record model="ir.ui.view" id="view_l10n_es_aeat_mod340_tree">
6 <field name="name">l10n.es.aeat.mod340.tree</field>7 <field name="name">l10n.es.aeat.mod340.tree</field>
@@ -17,11 +18,30 @@
17 </field>18 </field>
18 </record>19 </record>
19 20
21=======
22 <!-- Modelo 340 -->
23 <record model="ir.ui.view" id="view_l10n_es_aeat_mod340_tree">
24 <field name="name">l10n.es.aeat.mod340.tree</field>
25 <field name="model">l10n.es.aeat.mod340.report</field>
26 <field name="arch" type="xml">
27 <tree string="Model 340">
28 <field name="fiscalyear_id"/>
29 <field name="period_from"/>
30 <field name="period_to"/>
31 <field name="number"/>
32 <field name="type"/>
33 <field name="state" invisible="1"/>
34 </tree>
35 </field>
36 </record>
37
38>>>>>>> MERGE-SOURCE
20 <record id="view_l10n_es_aeat_mod340_form" model="ir.ui.view">39 <record id="view_l10n_es_aeat_mod340_form" model="ir.ui.view">
21 <field name="name">l10n_es.aeat.mod340.form</field>40 <field name="name">l10n_es.aeat.mod340.form</field>
22 <field name="model">l10n.es.aeat.mod340.report</field>41 <field name="model">l10n.es.aeat.mod340.report</field>
23 <field name="inherit_id" ref="l10n_es_aeat.view_l10n_es_aeat_report_form"/>42 <field name="inherit_id" ref="l10n_es_aeat.view_l10n_es_aeat_report_form"/>
24 <field name="arch" type="xml">43 <field name="arch" type="xml">
44<<<<<<< TREE
25 <button name="%(l10n_es_aeat.action_wizard_aeat_export)d" position="attributes">45 <button name="%(l10n_es_aeat.action_wizard_aeat_export)d" position="attributes">
26 <attribute name="name">%(action_wizard_aeat_mod340_export)d</attribute>46 <attribute name="name">%(action_wizard_aeat_mod340_export)d</attribute>
27 </button>47 </button>
@@ -183,6 +203,328 @@
183 </record>203 </record>
184 204
185 <record id="view_l10n_es_aeat_mod340_report_search" model="ir.ui.view">205 <record id="view_l10n_es_aeat_mod340_report_search" model="ir.ui.view">
206=======
207 <button name="%(l10n_es_aeat.action_wizard_aeat_export)d" position="attributes">
208 <attribute name="name">%(action_wizard_aeat_mod340_export)d</attribute>
209 </button>
210 <field name="fiscalyear_id" position="after">
211 <field name="period_from" required="1" domain="[('fiscalyear_id','=',fiscalyear_id)]"/>
212 <field name="period_to" required="1" domain="[('fiscalyear_id','=',fiscalyear_id)]"/>
213 </field>
214 <field name="calculation_date" position="after">
215 <field name="declaration_number"/>
216 <field name="support_type"/>
217 <field name="investment_goods_prorating"/>
218 </field>
219 <group string="Declaración" position="after">
220 <notebook colspan="4">
221 <page string="General">
222 <group string="Identification" colspan="4">
223 <field name="phone_contact" />
224 <field name="name_contact" />
225 <field name="representative_vat" />
226 </group>
227 <group string="Susbtitutive/complementary declaration" colspan="4">
228 <field name="type"/>
229 <field name="previous_number"/>
230 </group>
231 <group string="Electronic Code VAT reverse charge" colspan="4">
232 <field name="ean13" nolabel="1"/>
233 </group>
234 <group string="Summary" colspan="4">
235 <field name="number_records"/>
236 <field name="total_taxable"/>
237 <field name="total_sharetax"/>
238 <field name="total"/>
239 </group>
240 <group colspan="4" col="10">
241 </group>
242 </page>
243 <page string="Issued invoice">
244 <field name="issued" nolabel="1" />
245 </page>
246 <page string="Received invoice">
247 <field name="received" nolabel="1" />
248 </page>
249 <page string="Investment goods">
250 <field name="investment" nolabel="1"/>
251 </page>
252 <!-- TODO: intracommunity-->
253 <page string="Other intracommunity operations" invisible="1">
254 <field name="intracomunitarias" nolabel="1"/>
255 </page>
256 </notebook>
257 </group>
258 </field>
259 </record>
260 <!-- FIN Modelo 340 -->
261
262
263 <!--Invoice Issued-->
264
265 <record id="view_l10n_es_aeat_mod340_invoice_issued_tree" model="ir.ui.view">
266 <field name="name">l10n.es.aeat.mod340.issued.tree</field>
267 <field name="model">l10n.es.aeat.mod340.issued</field>
268 <field name="arch" type="xml">
269 <tree string="Issued invoices">
270 <field name="date_invoice"/>
271 <field name="partner_id"/>
272 <field name="operation_key"/>
273 <field name="partner_country_code"/>
274 <field name="partner_vat"/>
275 <field name="invoice_id"/>
276 <field name="base_tax" sum="Total Base" />
277 <field name="amount_tax" sum="Total Tax" />
278 <field name="total" sum="Total"/>
279 </tree>
280 </field>
281 </record>
282
283 <record id="view_l10n_es_aeat_mod340_invoice_issued_form" model="ir.ui.view">
284 <field name="name">l10n.es.aeat.mod340.issued.form</field>
285 <field name="model">l10n.es.aeat.mod340.issued</field>
286 <field name="arch" type="xml">
287 <form string="Issued invoices">
288 <field name="invoice_id"/>
289 <newline/>
290 <field name="partner_id"/>
291 <field name="partner_vat"/>
292 <field name="representative_vat"/>
293 <field name="partner_country_code"/>
294 <newline/>
295 <field name="base_tax" />
296 <field name="amount_tax" />
297 <newline/>
298 <field name="total"/>
299 <field name="ledger_key"/>
300 <field name="tax_line_ids"/>
301 <field name="operation_key"/>
302 </form>
303 </field>
304 </record>
305
306 <!--Invoice Received-->
307
308 <record id="view_l10n_es_aeat_mod340_invoice_received_tree" model="ir.ui.view">
309 <field name="name">l10n.es.aeat.mod340.received.tree</field>
310 <field name="model">l10n.es.aeat.mod340.received</field>
311 <field name="arch" type="xml">
312 <tree string="Received invoices">
313 <field name="partner_id"/>
314 <field name="operation_key"/>
315 <field name="partner_country_code"/>
316 <field name="partner_vat"/>
317 <field name="invoice_id"/>
318 <field name="base_tax" sum="Total Base"/>
319 <field name="amount_tax" sum="Total Tax"/>
320 <field name="total" sum="Total"/>
321 </tree>
322 </field>
323 </record>
324
325 <record id="view_l10n_es_aeat_mod340_invoice_received_form" model="ir.ui.view">
326 <field name="name">l10n.es.aeat.mod340.received.form</field>
327 <field name="model">l10n.es.aeat.mod340.received</field>
328 <field name="arch" type="xml">
329 <form string="Received invoices">
330 <field name="invoice_id"/>
331 <newline/>
332 <field name="partner_id"/>
333 <field name="partner_vat"/>
334 <field name="representative_vat"/>
335 <field name="partner_country_code"/>
336 <newline/>
337 <field name="base_tax"/>
338 <field name="amount_tax"/>
339 <newline/>
340 <field name="total"/>
341 <field name="ledger_key"/>
342 <field name="tax_line_ids"/>
343 <field name="operation_key"/>
344 </form>
345 </field>
346 </record>
347
348 <!--Investment goods -->
349
350 <record id="view_l10n_es_aeat_mod340_invoice_investment_tree" model="ir.ui.view">
351 <field name="name">l10n.es.aeat.mod340.investment.tree</field>
352 <field name="model">l10n.es.aeat.mod340.investment</field>
353 <field name="arch" type="xml">
354 <tree string="Investment goods">
355 <field name="partner_id"/>
356 <field name="operation_key"/>
357 <field name="partner_country_code"/>
358 <field name="partner_vat"/>
359 <field name="invoice_id"/>
360 <field name="base_tax" sum="Total Base"/>
361 <field name="amount_tax" sum="Total Tax"/>
362 <field name="total" sum="Total"/>
363 </tree>
364 </field>
365 </record>
366
367 <record id="view_l10n_es_aeat_mod340_invoice_investment_form" model="ir.ui.view">
368 <field name="name">l10n.es.aeat.mod340.investment.form</field>
369 <field name="model">l10n.es.aeat.mod340.investment</field>
370 <field name="arch" type="xml">
371 <form string="Investment goods">
372 <group>
373 <field name="invoice_id"/>
374 <field name="partner_id"/>
375 <field name="representative_vat"/>
376 <field name="base_tax"/>
377 <field name="amount_tax"/>
378 <field name="total"/>
379 <field name="tax_line_ids"/>
380 </group>
381 <group>
382 <field name="partner_vat"/>
383 <field name="partner_country_code"/>
384 <field name="ledger_key"/>
385 <field name="operation_key"/>
386 <field name="use_date"/>
387 <field name="prorata"/>
388 </group>
389 </form>
390 </field>
391 </record>
392
393 <!--Other Intracommunity Operations -->
394
395 <record id="view_l10n_es_aeat_mod340_invoice_intra_tree" model="ir.ui.view">
396 <field name="name">l10n.es.aeat.mod340.intra.tree</field>
397 <field name="model">l10n.es.aeat.mod340.intracomunitarias</field>
398 <field name="arch" type="xml">
399 <tree string="Other Intracommunity Operations">
400 <field name="partner_id"/>
401 <field name="operation_key"/>
402 <field name="partner_country_code"/>
403 <field name="partner_vat"/>
404 <field name="invoice_id"/>
405 <field name="base_tax" sum="Total Base"/>
406 <field name="amount_tax" sum="Total Tax"/>
407 <field name="total" sum="Total"/>
408 </tree>
409 </field>
410 </record>
411
412 <record id="view_l10n_es_aeat_mod340_invoice_intra_form" model="ir.ui.view">
413 <field name="name">l10n.es.aeat.mod340.intra.form</field>
414 <field name="model">l10n.es.aeat.mod340.intracomunitarias</field>
415 <field name="arch" type="xml">
416 <form string="Other Intracommunity Operations">
417 <field name="invoice_id"/>
418 <newline/>
419 <field name="partner_id"/>
420 <field name="partner_vat"/>
421 <field name="representative_vat"/>
422 <field name="partner_country_code"/>
423 <newline/>
424 <field name="base_tax"/>
425 <field name="amount_tax"/>
426 <newline/>
427 <field name="total"/>
428 <field name="ledger_key"/>
429 <field name="tax_line_ids"/>
430 <field name="operation_key"/>
431 </form>
432 </field>
433 </record>
434
435
436 <!--Vat Lines-->
437
438 <record id="view_l10n_es_aeat_mod340_tax_line_issued_form" model="ir.ui.view">
439 <field name="name">l10n.es.aeat.mod340.tax_line_issued.form</field>
440 <field name="model">l10n.es.aeat.mod340.tax_line_issued</field>
441 <field name="arch" type="xml">
442 <form string="Tax line issued">
443 <group>
444 <field name="name"/>
445 <field name="base_amount"/>
446 <field name="tax_percentage"/>
447 <field name="tax_amount"/>
448 </group>
449 <group>
450 <separator colspan="2"/>
451 <separator colspan="2"/>
452 <separator colspan="2"/>
453 <field name="surcharge_percentage"/>
454 <field name="surcharge_amount"/>
455 </group>
456 </form>
457 </field>
458 </record>
459
460 <record id="view_l10n_es_aeat_mod340_tax_line_issued_tree" model="ir.ui.view">
461 <field name="name">l10n.es.aeat.mod340.tax_line_issued.tree</field>
462 <field name="model">l10n.es.aeat.mod340.tax_line_issued</field>
463 <field name="arch" type="xml">
464 <tree string="Tax line issued">
465 <field name="name"/>
466 <field name="surcharge_percentage"/>
467 </tree>
468 </field>
469 </record>
470
471 <record id="view_l10n_es_aeat_mod340_tax_line_received_form" model="ir.ui.view">
472 <field name="name">l10n.es.aeat.mod340.tax_line_received.form</field>
473 <field name="model">l10n.es.aeat.mod340.tax_line_received</field>
474 <field name="arch" type="xml">
475 <form string="Tax line received">
476 <group>
477 <field name="name"/>
478 <field name="base_amount"/>
479 <field name="tax_percentage"/>
480 <field name="tax_amount"/>
481 </group>
482 <group>
483 <separator colspan="2"/>
484 <separator colspan="2"/>
485 <separator colspan="2"/>
486 <field name="surcharge_percentage"/>
487 <field name="surcharge_amount"/>
488 </group>
489 </form>
490 </field>
491 </record>
492
493 <record id="view_l10n_es_aeat_mod340_tax_line_investment_form" model="ir.ui.view">
494 <field name="name">l10n.es.aeat.mod340.tax_line_investment.form</field>
495 <field name="model">l10n.es.aeat.mod340.tax_line_investment</field>
496 <field name="arch" type="xml">
497 <form string="Tax line investment goods">
498 <group>
499 <field name="name"/>
500 <field name="base_amount"/>
501 <field name="tax_percentage"/>
502 <field name="tax_amount"/>
503 </group>
504 <group>
505 <field name="goods_identification"/>
506 </group>
507 </form>
508 </field>
509 </record>
510
511 <record id="view_l10n_es_aeat_mod340_tax_line_intra_form" model="ir.ui.view">
512 <field name="name">l10n.es.aeat.mod340.tax_line_intra.form</field>
513 <field name="model">l10n.es.aeat.mod340.tax_line_intra</field>
514 <field name="arch" type="xml">
515 <form string="Tax line intracommunity">
516 <group>
517 <field name="name"/>
518 <field name="base_amount"/>
519 <field name="tax_percentage"/>
520 <field name="tax_amount"/>
521 </group>
522 </form>
523 </field>
524 </record>
525
526 <record id="view_l10n_es_aeat_mod340_report_search" model="ir.ui.view">
527>>>>>>> MERGE-SOURCE
186 <field name="name">AEAT Model 340 (search)</field>528 <field name="name">AEAT Model 340 (search)</field>
187 <field name="model">l10n.es.aeat.mod340.report</field>529 <field name="model">l10n.es.aeat.mod340.report</field>
188 <field name="arch" type="xml">530 <field name="arch" type="xml">
189531
=== modified file 'l10n_es_aeat_mod340/res_partner.py'
--- l10n_es_aeat_mod340/res_partner.py 2014-02-09 16:33:45 +0000
+++ l10n_es_aeat_mod340/res_partner.py 2014-06-01 16:57:08 +0000
@@ -26,9 +26,7 @@
26from openerp.osv import orm, fields26from openerp.osv import orm, fields
2727
28class res_partner(orm.Model):28class res_partner(orm.Model):
29 """29
30 Extends the partners to add the include_in_mod347 field
31 """
32 _inherit = "res.partner"30 _inherit = "res.partner"
33 31
34 _columns = {32 _columns = {
3533
=== modified file 'l10n_es_aeat_mod340/security/ir.model.access.csv'
--- l10n_es_aeat_mod340/security/ir.model.access.csv 2014-02-09 16:33:45 +0000
+++ l10n_es_aeat_mod340/security/ir.model.access.csv 2014-06-01 16:57:08 +0000
@@ -6,3 +6,5 @@
6access_l10n_es_aeat_mod340_intracomunitarias_manager,l10n_es_aeat_mod340_intracomunitarias manager,model_l10n_es_aeat_mod340_intracomunitarias,l10n_es_aeat.group_account_aeat,1,1,1,16access_l10n_es_aeat_mod340_intracomunitarias_manager,l10n_es_aeat_mod340_intracomunitarias manager,model_l10n_es_aeat_mod340_intracomunitarias,l10n_es_aeat.group_account_aeat,1,1,1,1
7access_l10n_es_aeat_mod340_tax_line_issued,l10n_es_aeat_mod340_tax_line_issued,model_l10n_es_aeat_mod340_tax_line_issued,l10n_es_aeat.group_account_aeat,1,1,1,17access_l10n_es_aeat_mod340_tax_line_issued,l10n_es_aeat_mod340_tax_line_issued,model_l10n_es_aeat_mod340_tax_line_issued,l10n_es_aeat.group_account_aeat,1,1,1,1
8access_l10n_es_aeat_mod340_tax_line_received,l10n_es_aeat_mod340_tax_line_received,model_l10n_es_aeat_mod340_tax_line_received,l10n_es_aeat.group_account_aeat,1,1,1,18access_l10n_es_aeat_mod340_tax_line_received,l10n_es_aeat_mod340_tax_line_received,model_l10n_es_aeat_mod340_tax_line_received,l10n_es_aeat.group_account_aeat,1,1,1,1
9access_l10n_es_aeat_mod340_tax_line_investment,l10n_es_aeat_mod340_tax_line_investment,model_l10n_es_aeat_mod340_tax_line_investment,l10n_es_aeat.group_account_aeat,1,1,1,1
10access_l10n_es_aeat_mod340_tax_line_intra,l10n_es_aeat_mod340_tax_line_intra,model_l10n_es_aeat_mod340_tax_line_intra,l10n_es_aeat.group_account_aeat,1,1,1,1
911
=== added file 'l10n_es_aeat_mod340/taxes_common.xml'
--- l10n_es_aeat_mod340/taxes_common.xml 1970-01-01 00:00:00 +0000
+++ l10n_es_aeat_mod340/taxes_common.xml 2014-06-01 16:57:08 +0000
@@ -0,0 +1,284 @@
1<?xml version="1.0" encoding="utf-8"?>
2<openerp>
3 <data noupdate="0">
4 <!-- Plantilla común de impuestos para España.
5
6 Cargamos las claves para los impuestos presentes en l10n_es rev XXXXXX
7
8 TODO: poner revisión o fecha cuando se mergee la refactorización que ha hecho Pedro
9 https://code.launchpad.net/~pedro.baeza/openerp-spain/7.0-l10n_es-refactorized/+merge/196807
10 -->
11
12 <!-- NUEVOS (mover a su sitio) -->
13 <!-- 12% IVA Soportado régimen agricultura -->
14 <record id="l10n_es.iva_sop_12_agr" model="account.tax.template">
15 <field name="ledger_key">R</field>
16 <field name="operation_key">X</field>
17 </record>
18 <!-- IVA 21% Intracomunitario. Servicios -->
19 <record id="l10n_es.iva_IC_compras_21_sv" model="account.tax.template">
20 <field name="ledger_key">R</field>
21 <field name="operation_key">I</field>
22 </record>
23 <!-- IVA 21% Intracomunitario. Servicios (1) -->
24 <record id="l10n_es.iva_IC_compras_21_sv_1" model="account.tax.template">
25 <field name="ledger_key">R</field>
26 <field name="operation_key">I</field>
27 </record>
28 <!-- IVA 21% Intracomunitario. Servicios (2) -->
29 <record id="l10n_es.iva_IC_compras_21_sv_2" model="account.tax.template">
30 <field name="ledger_key">R</field>
31 <field name="operation_key">I</field>
32 </record>
33 <!-- FIN NUEVOS -->
34
35 <!-- IVA soportado -->
36 <!-- 4% IVA Soportado (operaciones corrientes) -->
37 <record id="l10n_es.iva_sop_4" model="account.tax.template">
38 <field name="ledger_key">R</field>
39 </record>
40
41 <!-- 4% IVA Soportado (bienes de inversión) -->
42 <record id="l10n_es.iva_sop_4_inv" model="account.tax.template">
43 <field name="ledger_key">I</field>
44 </record>
45
46 <!-- 10% IVA Soportado (operaciones corrientes) -->
47 <record id="l10n_es.iva_sop_10" model="account.tax.template">
48 <field name="ledger_key">R</field>
49 </record>
50
51 <!-- 10% IVA Soportado (bienes de inversión) -->
52 <record id="l10n_es.iva_sop_10_inv" model="account.tax.template">
53 <field name="ledger_key">I</field>
54 </record>
55
56 <!-- 21% IVA Soportado (operaciones corrientes) -->
57 <record id="l10n_es.iva_sop_21" model="account.tax.template">
58 <field name="ledger_key">R</field>
59 </record>
60
61 <!-- 21% IVA Soportado (bienes de inversión) -->
62 <record id="l10n_es.iva_sop_21_inv" model="account.tax.template">
63 <field name="ledger_key">I</field>
64 </record>
65
66 <!-- Plantillas para Extracomunitario-->
67 <!-- IVA compras -->
68 <!-- IVA 0% Importaciones bienes corrientes -->
69 <record id="l10n_es.iva_X0_compras_bc" model="account.tax.template">
70 <field name="ledger_key">R</field>
71 </record>
72 <!-- IVA 0% Importaciones bienes de inversión -->
73 <record id="l10n_es.iva_X0_compras_bi" model="account.tax.template">
74 <field name="ledger_key">I</field>
75 </record>
76 <!-- IVA 4% Importaciones bienes corrientes -->
77 <record id="l10n_es.iva_X4_compras_bc" model="account.tax.template">
78 <field name="ledger_key">R</field>
79 </record>
80 <!-- IVA 4% Importaciones bienes de inversión -->
81 <record id="l10n_es.iva_X4_compras_bi" model="account.tax.template">
82 <field name="ledger_key">I</field>
83 </record>
84 <!-- IVA 10% Importaciones bienes corrientes -->
85 <record id="l10n_es.iva_X10_compras_bc" model="account.tax.template">
86 <field name="ledger_key">R</field>
87 </record>
88 <!-- IVA 10% Importaciones bienes de inversión -->
89 <record id="l10n_es.iva_X10_compras_bi" model="account.tax.template">
90 <field name="ledger_key">I</field>
91 </record>
92 <!-- IVA 21% Importaciones bienes corrientes -->
93 <record id="l10n_es.iva_X21_compras_bc" model="account.tax.template">
94 <field name="ledger_key">R</field>
95 </record>
96 <!-- IVA 21% Importaciones bienes de inversión -->
97 <record id="l10n_es.iva_X21_compras_bi" model="account.tax.template">
98 <field name="ledger_key">I</field>
99 </record>
100
101 <!-- IVA EXPORTACIONES (VENTAS )-->
102 <!-- IVA 0% Exportaciones -->
103 <record id="l10n_es.iva_X0" model="account.tax.template">
104 <field name="ledger_key">E</field>
105 </record>
106
107 <!-- Inversión del sujeto pasivo -->
108 <!-- IVA 21% Inversión del sujeto pasivo -->
109 <record id="l10n_es.iva_ISP_compras_21" model="account.tax.template">
110 <field name="ledger_key">R</field>
111 <field name="operation_key">I</field>
112 </record>
113 <!-- IVA 21% Inversión del sujeto pasivo (1) -->
114 <record id="l10n_es.iva_ISP_compras_21_1" model="account.tax.template">
115 <field name="ledger_key">R</field>
116 <field name="operation_key">I</field>
117 </record>
118 <!-- IVA 21% Inversión del sujeto pasivo (2) -->
119 <record id="l10n_es.iva_ISP_compras_21_2" model="account.tax.template">
120 <field name="ledger_key">R</field>
121 <field name="operation_key">I</field>
122 </record>
123 <!-- IVA 21% Inversión del sujeto pasivo (3) -->
124 <record id="l10n_es.iva_ISP_compras_21_3" model="account.tax.template">
125 <field name="ledger_key">R</field>
126 <field name="operation_key">I</field>
127 </record>
128
129 <!-- IVA REPERCUTIDO-->
130 <!-- IVA 4% -->
131 <record id="l10n_es.iva_rep_4" model="account.tax.template">
132 <field name="ledger_key">E</field>
133 </record>
134 <!-- IVA 10% -->
135 <record id="l10n_es.iva_rep_10" model="account.tax.template">
136 <field name="ledger_key">E</field>
137 </record>
138 <!-- IVA 21% -->
139 <record id="l10n_es.iva_rep_21" model="account.tax.template">
140 <field name="ledger_key">E</field>
141 </record>
142
143 <!-- Plantillas para recargo de equivalencia-->
144 <!-- 0.50% Recargo Equivalencia Ventas -->
145 <record id="l10n_es.re_05" model="account.tax.template">
146 <field name="ledger_key">E</field>
147 <field name="operation_key">-</field>
148 </record>
149 <!-- 1.4% Recargo Equivalencia Ventas -->
150 <record id="l10n_es.re_14" model="account.tax.template">
151 <field name="ledger_key">E</field>
152 <field name="operation_key">-</field>
153 </record>
154 <!-- 5.2% Recargo Equivalencia Ventas -->
155 <record id="l10n_es.re_52" model="account.tax.template">
156 <field name="ledger_key">E</field>
157 <field name="operation_key">-</field>
158 </record>
159 <!-- 0.50% Recargo Equivalencia Compras -->
160 <record id="l10n_es.re_buy_05" model="account.tax.template">
161 <field name="ledger_key">R</field>
162 <field name="operation_key">-</field>
163 </record>
164 <!-- 1.4% Recargo Equivalencia Compras -->
165 <record id="l10n_es.re_buy_14" model="account.tax.template">
166 <field name="ledger_key">R</field>
167 <field name="operation_key">-</field>
168 </record>
169 <!-- 5.2% Recargo Equivalencia Compras -->
170 <record id="l10n_es.re_buy_52" model="account.tax.template">
171 <field name="ledger_key">R</field>
172 <field name="operation_key">-</field>
173 </record>
174
175 <!-- OPERACIONES INTRACOMUNITARIAS -->
176
177 <!-- VENTAS -->
178 <!-- IVA 0% Intracomunitario -->
179 <record id="l10n_es.iva_IO" model="account.tax.template">
180 <field name="ledger_key">E</field>
181 </record>
182
183 <!-- COMPRAS -->
184 <!-- IVA 4% Intracomunitario. Bienes corrientes -->
185 <record id="l10n_es.iva_IC_compras_4_bc" model="account.tax.template">
186 <field name="ledger_key">R</field>
187 <field name="operation_key">P</field>
188 </record>
189 <!-- IVA 4% Intracomunitario. Bienes corrientes (1) -->
190 <record id="l10n_es.iva_IC_compras_4_bc_1" model="account.tax.template">
191 <field name="ledger_key">R</field>
192 <field name="operation_key">P</field>
193 </record>
194 <!-- IVA 4% Intracomunitario. Bienes corrientes (2) -->
195 <record id="l10n_es.iva_IC_compras_4_bc_2" model="account.tax.template">
196 <field name="ledger_key">R</field>
197 <field name="operation_key">P</field>
198 </record>
199 <!-- IVA 4% Intracomunitario. Bienes de inversión -->
200 <record id="l10n_es.iva_IC_compras_4_bi" model="account.tax.template">
201 <field name="ledger_key">I</field>
202 <field name="operation_key">P</field>
203 </record>
204 <!-- IVA 4% Intracomunitario. Bienes de inversión (1) -->
205 <record id="l10n_es.iva_IC_compras_4_bi_1" model="account.tax.template">
206 <field name="ledger_key">I</field>
207 <field name="operation_key">P</field>
208 </record>
209 <!-- IVA 4% Intracomunitario. Bienes de inversión (2) -->
210 <record id="l10n_es.iva_IC_compras_4_bi_2" model="account.tax.template">
211 <field name="ledger_key">I</field>
212 <field name="operation_key">P</field>
213 </record>
214 <!-- IVA 10% Intracomunitario. Bienes corrientes -->
215 <record id="l10n_es.iva_IC_compras_10_bc" model="account.tax.template">
216 <field name="ledger_key">R</field>
217 <field name="operation_key">P</field>
218 </record>
219 <!-- IVA 10% Intracomunitario. Bienes corrientes (1) -->
220 <record id="l10n_es.iva_IC_compras_10_bc_1" model="account.tax.template">
221 <field name="ledger_key">R</field>
222 <field name="operation_key">P</field>
223 </record>
224 <!-- IVA 10% Intracomunitario. Bienes corrientes (2) -->
225 <record id="l10n_es.iva_IC_compras_10_bc_2" model="account.tax.template">
226 <field name="ledger_key">R</field>
227 <field name="operation_key">P</field>
228 </record>
229 <!-- IVA 10% Intracomunitario. Bienes de inversión -->
230 <record id="l10n_es.iva_IC_compras_10_bi" model="account.tax.template">
231 <field name="ledger_key">I</field>
232 <field name="operation_key">P</field>
233 </record>
234 <!-- IVA 10% Intracomunitario. Bienes de inversión (1) -->
235 <record id="l10n_es.iva_IC_compras_10_bi_1" model="account.tax.template">
236 <field name="ledger_key">I</field>
237 <field name="operation_key">P</field>
238 </record>
239 <!-- IVA 10% Intracomunitario. Bienes de inversión (2) -->
240 <record id="l10n_es.iva_IC_compras_10_bi_2" model="account.tax.template">
241 <field name="ledger_key">I</field>
242 <field name="operation_key">P</field>
243 </record>
244 <!-- IVA 21% Intracomunitario. Bienes corrientes -->
245 <record id="l10n_es.iva_IC_compras_21_bc" model="account.tax.template">
246 <field name="ledger_key">R</field>
247 <field name="operation_key">P</field>
248 </record>
249 <!-- IVA 21% Intracomunitario. Bienes corrientes (1) -->
250 <record id="l10n_es.iva_IC_compras_21_bc_1" model="account.tax.template">
251 <field name="ledger_key">R</field>
252 <field name="operation_key">P</field>
253 </record>
254 <!-- IVA 21% Intracomunitario. Bienes corrientes (2) -->
255 <record id="l10n_es.iva_IC_compras_21_bc_2" model="account.tax.template">
256 <field name="ledger_key">R</field>
257 <field name="operation_key">P</field>
258 </record>
259 <!-- IVA 21% Intracomunitario. Bienes de inversión -->
260 <record id="l10n_es.iva_IC_compras_21_bi" model="account.tax.template">
261 <field name="ledger_key">I</field>
262 <field name="operation_key">P</field>
263 </record>
264 <!-- IVA 21% Intracomunitario. Bienes de inversión (1) -->
265 <record id="l10n_es.iva_IC_compras_21_bi_1" model="account.tax.template">
266 <field name="ledger_key">I</field>
267 <field name="operation_key">P</field>
268 </record>
269 <!-- IVA 21% Intracomunitario. Bienes de inversión (2) -->
270 <record id="l10n_es.iva_IC_compras_21_bi_2" model="account.tax.template">
271 <field name="ledger_key">I</field>
272 <field name="operation_key">P</field>
273 </record>
274 <!-- IVA Soportado exento (operaciones corrientes) -->
275 <record id="l10n_es.iva_sop_ex" model="account.tax.template">
276 <field name="ledger_key">R</field>
277 </record>
278 <!-- IVA Exento -->
279 <record id="l10n_es.iva_rep_ex" model="account.tax.template">
280 <field name="ledger_key">E</field>
281 </record>
282
283 </data>
284</openerp>
0285
=== renamed file 'l10n_es_aeat_mod340/taxes_data.xml' => 'l10n_es_aeat_mod340/taxes_data.xml.THIS'
=== modified file 'l10n_es_aeat_mod340/wizard/calculate_mod340_records.py'
--- l10n_es_aeat_mod340/wizard/calculate_mod340_records.py 2014-02-24 14:45:52 +0000
+++ l10n_es_aeat_mod340/wizard/calculate_mod340_records.py 2014-06-01 16:57:08 +0000
@@ -26,8 +26,8 @@
26import re26import re
27from openerp.tools.translate import _27from openerp.tools.translate import _
28from openerp.osv import orm28from openerp.osv import orm
29from datetime import datetime29from openerp.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT
30from dateutil.relativedelta import relativedelta30from openerp.tools.float_utils import float_round
3131
32class l10n_es_aeat_mod340_calculate_records(orm.TransientModel):32class l10n_es_aeat_mod340_calculate_records(orm.TransientModel):
33 _name = "l10n.es.aeat.mod340.calculate_records"33 _name = "l10n.es.aeat.mod340.calculate_records"
@@ -45,6 +45,48 @@
45 45
4646
47 def _calculate_records(self, cr, uid, ids, context=None, recalculate=True):47 def _calculate_records(self, cr, uid, ids, context=None, recalculate=True):
48 fiscal_position_tax_obj = self.pool.get('account.fiscal.position.tax')
49 def _get_source_tax(tax_line, pct, inv):
50 ''' Recupera cuál es el impuesto que originó la línea de impuesto a partir
51 de su tipo y su código base '''
52 for line in inv.invoice_line:
53 for tax in line.invoice_line_tax_id:
54 if tax.base_code_id.id == tax_line.base_code_id.id and pct == tax.amount:
55 return tax
56 for child_tax in tax.child_ids:
57 if child_tax.base_code_id.id == tax_line.base_code_id.id and pct == child_tax.amount:
58 return child_tax
59 raise orm.except_orm(_('Error'),
60 _("Invoice %s: Unable to determine the tax line %s source tax. The base code of the source tax may have been changed, please recompute the invoice taxes") % (inv.number,tax_line.name))
61
62
63 def _get_surcharged_tax(position_id, surcharge_id):
64 mapping_ids = fiscal_position_tax_obj.search(cr, uid, [('position_id','=',position_id),
65 ('tax_dest_id','=',surcharge_id)], context=context)
66 if not mapping_ids:
67 return False
68 mapping = fiscal_position_tax_obj.browse(cr, uid, mapping_ids[0], context)
69 mapping_ids = fiscal_position_tax_obj.search(cr, uid, [('position_id','=',position_id),
70 ('tax_src_id','=',mapping.tax_src_id.id),
71 ('tax_dest_id','!=',surcharge_id)], context=context)
72 if not mapping_ids:
73 return False
74 mapping = fiscal_position_tax_obj.browse(cr, uid, mapping_ids[0], context)
75 return mapping.tax_dest_id.id
76
77 def _rounded_pct(allowed_pcts, pct, key, invoice, threshold=0.01):
78 pcts = allowed_pcts[key]
79 sign = 1
80 if pct < 0:
81 sign = -1
82 pct = pct * -1
83 candidates = [(x, abs(x-pct)) for x in pcts]
84 candidates.sort(key=lambda x: x[1])
85 if candidates[0][1] <= threshold:
86 return candidates[0][0] * sign
87 raise orm.except_orm(_('Error'),
88 _("Invoice %s: No match found for tax percentage %s") % (invoice.number, pct))
89
48 if context is None:90 if context is None:
49 context = {}91 context = {}
5092
@@ -54,12 +96,22 @@
54 96
55 invoices340 = self.pool.get('l10n.es.aeat.mod340.issued')97 invoices340 = self.pool.get('l10n.es.aeat.mod340.issued')
56 invoices340_rec = self.pool.get('l10n.es.aeat.mod340.received')98 invoices340_rec = self.pool.get('l10n.es.aeat.mod340.received')
99 invoices340_inv = self.pool.get('l10n.es.aeat.mod340.investment')
100 invoices340_intra = self.pool.get('l10n.es.aeat.mod340.intracomunitarias')
57 period_obj = self.pool.get('account.period')101 period_obj = self.pool.get('account.period')
102 precision = self.pool.get('decimal.precision').precision_get(cr, uid, 'Account')
103 tax_obj = self.pool.get('account.tax')
58 104
59 mod340.write({105 allowed_tax_pct = tax_obj._allowed_pct_by_ledger(cr, uid, context)
60 'state' : 'calculated',106 ledger2obj = {
61 'calculation_date' : time.strftime('%Y-%m-%d %H:%M:%S')107 'I': invoices340_inv,
62 })108 'J': invoices340_inv,
109 'U': invoices340_intra,
110 'E': invoices340,
111 'F': invoices340,
112 'R': invoices340_rec,
113 'S': invoices340_rec
114 }
63 115
64 if not mod340.company_id.partner_id.vat:116 if not mod340.company_id.partner_id.vat:
65 raise orm.except_orm(mod340.company_id.partner_id.name,117 raise orm.except_orm(mod340.company_id.partner_id.name,
@@ -68,9 +120,6 @@
68 wf_service = netsvc.LocalService("workflow")120 wf_service = netsvc.LocalService("workflow")
69 wf_service.trg_validate(uid, 'l10n.es.aeat.mod347.report',121 wf_service.trg_validate(uid, 'l10n.es.aeat.mod347.report',
70 ids and ids[0], 'calculate', cr)122 ids and ids[0], 'calculate', cr)
71
72 code = '340' + mod340.fiscalyear_id.code + ''
73 code += mod340.period_to.date_stop[5:7] + '0001'
74 123
75 account_period_ids = period_obj.build_ctx_periods(cr, uid,124 account_period_ids = period_obj.build_ctx_periods(cr, uid,
76 mod340.period_from.id, mod340.period_to.id)125 mod340.period_from.id, mod340.period_to.id)
@@ -80,25 +129,27 @@
80 _("The periods selected don't belong to the fiscal year %s") 129 _("The periods selected don't belong to the fiscal year %s")
81 % (mod340.fiscalyear_id.name))130 % (mod340.fiscalyear_id.name))
82 131
83 tot_base = 0
84 tot_amount = 0
85 tot_tot = 0
86 tot_rec = 0
87
88
89 #Limpieza de las facturas calculadas anteriormente132 #Limpieza de las facturas calculadas anteriormente
90 133
91 del_ids = invoices340.search(cr, uid, [134 del_ids = invoices340.search(cr, uid, [('mod340_id', '=', mod340.id)])
92 ('mod340_id', '=', mod340.id)])
93135
94 if del_ids:136 if del_ids:
95 invoices340.unlink(cr, uid, del_ids, context=context)137 invoices340.unlink(cr, uid, del_ids, context=context)
96 138
97 del_ids = invoices340_rec.search(cr, uid, [139 del_ids = invoices340_rec.search(cr, uid, [('mod340_id', '=', mod340.id)])
98 ('mod340_id', '=', mod340.id)])
99140
100 if del_ids:141 if del_ids:
101 invoices340_rec.unlink(cr, uid, del_ids, context=context)142 invoices340_rec.unlink(cr, uid, del_ids, context=context)
143
144 del_ids = invoices340_inv.search(cr, uid, [('mod340_id', '=', mod340.id)])
145
146 if del_ids:
147 invoices340_inv.unlink(cr, uid, del_ids, context=context)
148
149 del_ids = invoices340_intra.search(cr, uid, [('mod340_id', '=', mod340.id)])
150
151 if del_ids:
152 invoices340_intra.unlink(cr, uid, del_ids, context=context)
102 153
103 domain = [('period_id', 'in',account_period_ids), 154 domain = [('period_id', 'in',account_period_ids),
104 ('state', 'in', ('open', 'paid'))]155 ('state', 'in', ('open', 'paid'))]
@@ -111,6 +162,7 @@
111 if tax_line.base_code_id and tax_line.base:162 if tax_line.base_code_id and tax_line.base:
112 if tax_line.base_code_id.mod340 == True:163 if tax_line.base_code_id.mod340 == True:
113 include = True164 include = True
165 break
114 if include == True:166 if include == True:
115 if invoice.partner_id.vat_type == 1:167 if invoice.partner_id.vat_type == 1:
116 if not invoice.partner_id.vat:168 if not invoice.partner_id.vat:
@@ -122,7 +174,8 @@
122 re.match(r"([A-Z]{0,2})(.*)",174 re.match(r"([A-Z]{0,2})(.*)",
123 invoice.partner_id.vat).groups()[1]175 invoice.partner_id.vat).groups()[1]
124 country_code = invoice.partner_id.country_id.code176 country_code = invoice.partner_id.country_id.code
125 177 ledger_key, operation_key = invoice_obj.get_340_classification(cr, uid, invoice.id, context)
178 amounts = invoice_obj.get_cc_amounts(cr, uid, invoice.id, context)
126 values = {179 values = {
127 'mod340_id': mod340.id,180 'mod340_id': mod340.id,
128 'partner_id': invoice.partner_id.id,181 'partner_id': invoice.partner_id.id,
@@ -130,33 +183,49 @@
130 'representative_vat': '',183 'representative_vat': '',
131 'partner_country_code': country_code,184 'partner_country_code': country_code,
132 'invoice_id': invoice.id,185 'invoice_id': invoice.id,
133 'base_tax': invoice.amount_untaxed,186 'base_tax': amounts['cc_amount_untaxed'],
134 'amount_tax': invoice.amount_tax,187 'total': amounts['cc_amount_total'],
135 'total': invoice.amount_total,
136 'date_invoice': invoice.date_invoice,188 'date_invoice': invoice.date_invoice,
189 'ledger_key': ledger_key,
190 'operation_key': operation_key
137 }191 }
192 if ledger_key in ('I', 'J'):
193 values['use_date'] = invoice.date_invoice
138 if invoice.type in ( 'out_refund','in_refund'):194 if invoice.type in ( 'out_refund','in_refund'):
139 values['base_tax'] *= -1195 values['base_tax'] *= -1
140 values['amount_tax'] *= -1
141 values['total'] *= -1196 values['total'] *= -1
142
143 197
144 if invoice.type=="out_invoice" or invoice.type=="out_refund":198 invoice_created = ledger2obj[ledger_key].create(cr,uid,values)
145 invoice_created = invoices340.create(cr,uid,values)
146
147 if invoice.type=="in_invoice" or invoice.type=="in_refund":
148 invoice_created = invoices340_rec.create(cr,uid,values)
149 199
150 tot_tax_invoice = 0200 tot_tax_invoice = 0
151 check_tax = 0
152 check_base = 0201 check_base = 0
153 202 added_tax_lines = []
203 values_taxes = {}
204 values_surcharges = {}
154 # Add the invoices detail to the partner record205 # Add the invoices detail to the partner record
155 for tax_line in invoice.tax_line:206 for tax_line in invoice.tax_line:
156 if tax_line.base_code_id and tax_line.base:207 if tax_line.base_code_id and tax_line.base:
157 if tax_line.base_code_id.mod340 == True:208 if tax_line.base_code_id.mod340 == True:
158 tax_percentage = tax_line.amount/tax_line.base209 tax_percentage = tax_line.amount/tax_line.base
159 210 tax_percentage = _rounded_pct(allowed_tax_pct, tax_percentage, ledger_key, invoice)
211 source_tax = _get_source_tax(tax_line, tax_percentage, invoice)
212
213 #El IVA agrario aunque tenga tipo 12% debe declararse con 0%
214 if source_tax.operation_key and source_tax.operation_key == 'X':
215 tax_percentage = 0
216
217 #No se debe contar la base de los recargos de equivalencia o el
218 #check fallará al sumar el doble que el subtotal de la factura
219 if tax_percentage >= 0 and source_tax.operation_key != '-':
220 check_base += tax_line.base
221
222 #Los impuestos que se desdoblan en 2 hijos como los de
223 #compras intra solo deben generar un registro
224 if (tax_line.base_amount, tax_percentage) in added_tax_lines:
225 continue
226
227 tot_tax_invoice += tax_line.tax_amount
228 added_tax_lines.append((tax_line.base_amount, tax_percentage*-1))
160 values = {229 values = {
161 'name': tax_line.name,230 'name': tax_line.name,
162 'tax_percentage': tax_percentage,231 'tax_percentage': tax_percentage,
@@ -164,54 +233,58 @@
164 'base_amount': tax_line.base_amount,233 'base_amount': tax_line.base_amount,
165 'invoice_record_id': invoice_created,234 'invoice_record_id': invoice_created,
166 }235 }
167 if invoice.type=="out_invoice" or invoice.type=="out_refund":236 if source_tax.ledger_key in ('I','J'):
168 issued_obj = self.pool.get('l10n.es.aeat.mod340.tax_line_issued')237 values['goods_identification'] = invoice_obj.get_inv_good_names(cr, uid, invoice.id, tax_percentage, context)
169 issued_obj.create(cr, uid, values)238
170 if invoice.type=="in_invoice" or invoice.type=="in_refund":239 # Separamos recargos de los impuestos corrientes y agrupamos por impuesto
171 received_obj = self.pool.get('l10n.es.aeat.mod340.tax_line_received')240 # Esta agrupación se hace porque un mismo impuesto OpenERP lo desdobla en 2 líneas de impuestos
172 received_obj.create(cr, uid, values)241 # si hay líneas con importe positivo (línea impuesto con base con un signo)
173 tot_tax_invoice += tax_line.tax_amount242 # y negativo (línea impuesto con base de signo opuesto)
174 tot_rec += 1243 if source_tax.operation_key and source_tax.operation_key == '-':
175 check_tax += tax_line.tax_amount244 if source_tax.id in values_surcharges:
176 if tax_percentage >= 0:245 for key in ['tax_amount', 'base_amount']:
177 check_base += tax_line.base_amount246 values_surcharges[source_tax.id][key] += values[key]
178 247 else:
179 tot_base += invoice.amount_untaxed248 values_surcharges[source_tax.id] = values
180 tot_amount += tot_tax_invoice249 else:
181 tot_tot += invoice.amount_untaxed + tot_tax_invoice250 if source_tax.id in values_taxes:
182 251 for key in ['tax_amount', 'base_amount']:
183 if invoice.type == "out_invoice" or invoice.type == "out_refund":252 values_taxes[source_tax.id][key] += values[key]
184 invoices340.write(cr,uid,invoice_created,253 else:
185 {'amount_tax':tot_tax_invoice})254 values_taxes[source_tax.id] = values
186 if invoice.type == "in_invoice" or invoice.type == "in_refund":255
187 invoices340_rec.write(cr,uid,invoice_created,256 #Juntamos los recargos con los registros de impuestos a los que afectan
188 {'amount_tax':tot_tax_invoice})257 position_id = invoice.fiscal_position.id
189 258 for surcharge_id, values in values_surcharges.items():
190 sign=1259 surcharged_tax_id = _get_surcharged_tax(position_id, surcharge_id)
191 if invoice.type in ( 'out_refund','in_refund' ):260 if not surcharged_tax_id:
192 sign = -1261 raise orm.except_orm(_('Error'),
193 262 _("Invoice %s: Unable to determine the surcharged tax because it is not mapped in the partner's fiscal position %s")
194 if str(invoice.amount_untaxed*sign) != str(check_base):263 % (invoice.number, surcharge_id.description))
264 values_taxes[surcharged_tax_id]['surcharge_percentage'] = values['tax_percentage']
265 values_taxes[surcharged_tax_id]['surcharge_amount'] = values['tax_amount']
266
267 ledger2obj[ledger_key].write(cr, uid, invoice_created,
268 {'tax_line_ids': [(0,0, values) for values in values_taxes.values()],
269 'amount_tax':tot_tax_invoice}, context)
270
271 if abs(float_round(invoice.amount_untaxed, precision)-float_round(check_base, precision)) > 0.01:
195 raise orm.except_orm( "REVIEW INVOICE",272 raise orm.except_orm( "REVIEW INVOICE",
196 _('Invoice %s, Amount untaxed Lines %.2f do not correspond to AmountUntaxed on Invoice %.2f' )273 _('Invoice %s, Amount untaxed on Lines %.2f do not correspond to AmountUntaxed on Invoice %.2f' )
197 %(invoice.number, check_base, 274 %(invoice.number, check_base,
198 invoice.amount_untaxed*sign) )275 invoice.amount_untaxed) )
199 276
200 mod340.write({'total_taxable':tot_base,'total_sharetax':tot_amount,277 code = '340' + mod340.fiscalyear_id.code
201 'number_records':tot_rec,'total':tot_tot,278 code += mod340.period_to.date_stop[5:7] + '0001'
202 'declaration_number':code})279 mod340.write({
203 280 'declaration_number':code,
204 if recalculate:281 'state' : 'calculated',
205 mod340.write({282 'calculation_date' : time.strftime(DEFAULT_SERVER_DATETIME_FORMAT)
206 'state' : 'calculated',283 })
207 'calculation_date' : time.strftime('%Y-%m-%d %H:%M:%S')
208 })
209 284
210 except Exception, ex:285 except Exception, ex:
211 raise286 raise
212 287
213
214
215 return True288 return True
216289
217290
218291
=== modified file 'l10n_es_aeat_mod340/wizard/export_mod340_to_boe.py'
--- l10n_es_aeat_mod340/wizard/export_mod340_to_boe.py 2014-02-16 18:24:48 +0000
+++ l10n_es_aeat_mod340/wizard/export_mod340_to_boe.py 2014-06-01 16:57:08 +0000
@@ -26,11 +26,19 @@
26from openerp.osv import orm26from openerp.osv import orm
27import base6427import base64
28import time28import time
29from openerp.tools.misc import DEFAULT_SERVER_DATE_FORMAT
2930
3031
31class l10n_es_aeat_mod340_export_to_boe(orm.TransientModel):32class l10n_es_aeat_mod340_export_to_boe(orm.TransientModel):
32 _inherit = "l10n.es.aeat.report.export_to_boe"33 _inherit = "l10n.es.aeat.report.export_to_boe"
33 _name = "l10n.es.aeat.mod340.export_to_boe"34 _name = "l10n.es.aeat.mod340.export_to_boe"
35
36 def _formatDate(self, date_str):
37 #TODO: mover este método a l10n.es.aeat.report.export_to_boe
38 if not date_str:
39 return '0'*8
40 date = datetime.strptime(date_str,DEFAULT_SERVER_DATE_FORMAT)
41 return datetime.strftime(date, "%Y%m%d")
3442
35 def _get_formatted_declaration_record(self, cr, uid, report, context=None):43 def _get_formatted_declaration_record(self, cr, uid, report, context=None):
36 """44 """
@@ -146,10 +154,9 @@
146 79-95 Número de identificación fiscal en el país de154 79-95 Número de identificación fiscal en el país de
147 residencia. TODO de momento blancos.155 residencia. TODO de momento blancos.
148 96-98 Blancos156 96-98 Blancos
149 99 Clave tipo de libro. Constante 'E'.157 99 Clave tipo de libro.
150 100 Clave de operación. Constante ' ' para un solo tipo de158 100 Clave de operación. Recuperado de los impuestos de la factura.
151 IVA. Constante 'C' para varios tipos de IVA. TODO Resto159 Constante 'C' para varios tipos de IVA.
152 de operaciones. Varios tipos impositivos.
153 101-108 Fecha de expedición160 101-108 Fecha de expedición
154 109-116 Fecha de operación. Se consigna la misma que161 109-116 Fecha de operación. Se consigna la misma que
155 expedición. TODO. Fecha del uso del bien.162 expedición. TODO. Fecha del uso del bien.
@@ -167,8 +174,8 @@
167 246-325 Intervalo de acumulación. Vacio. TODO Intervalo de174 246-325 Intervalo de acumulación. Vacio. TODO Intervalo de
168 resumenes de facturas o tickets.175 resumenes de facturas o tickets.
169 326-365 Identificación de la factura rectificativa. TODO.176 326-365 Identificación de la factura rectificativa. TODO.
170 366-370 Tipo recargo de equivalencia. TODO.177 366-370 Tipo recargo de equivalencia.
171 371-384 Cuota recargo de equivalencia. TODO.178 371-384 Cuota recargo de equivalencia.
172 385 Situación del Inmueble #TODO179 385 Situación del Inmueble #TODO
173 386-410 Referencia Catastral #TODO180 386-410 Referencia Catastral #TODO
174 411-425 Importe Percibido en Metálico #TODO181 411-425 Importe Percibido en Metálico #TODO
@@ -210,27 +217,19 @@
210 else: text += 17 * ' '217 else: text += 17 * ' '
211 # Blancos218 # Blancos
212 text += 3 * ' '219 text += 3 * ' '
213 # Clave tipo de libro. Constante 'E'. 220 # Clave tipo de libro.
214 text += 'E' 221 text += self._formatString(invoice_issued.ledger_key, 1)
215 # Clave de operación222 # Clave de operación
216 if invoice_issued.invoice_id.origin_invoices_ids: 223 if invoice_issued.invoice_id.origin_invoices_ids:
217 text += 'D'224 clave_operacion = 'D'
218 elif len(invoice_issued.tax_line_ids) > 1: text += 'C'225 elif len(invoice_issued.tax_line_ids) > 1: clave_operacion = 'C'
219 elif invoice_issued.invoice_id.is_ticket_summary == 1: text += 'B'226 elif invoice_issued.invoice_id.is_ticket_summary == 1: clave_operacion = 'B'
220 else: text += ' '227 else: clave_operacion = self._formatString(invoice_issued.operation_key, 1)
221 228 text += clave_operacion
222 text += self._formatNumber(229
223 invoice_issued.invoice_id.date_invoice.split('-')[0], 4)230 text += self._formatDate(invoice_issued.invoice_id.date_invoice)
224 text += self._formatNumber(231 text += self._formatDate(invoice_issued.invoice_id.date_invoice)
225 invoice_issued.invoice_id.date_invoice.split('-')[1], 2)232
226 text += self._formatNumber(
227 invoice_issued.invoice_id.date_invoice.split('-')[2], 2)
228 text += self._formatNumber(
229 invoice_issued.invoice_id.date_invoice.split('-')[0], 4)
230 text += self._formatNumber(
231 invoice_issued.invoice_id.date_invoice.split('-')[1], 2)
232 text += self._formatNumber(
233 invoice_issued.invoice_id.date_invoice.split('-')[2], 2)
234 #Tipo impositivo233 #Tipo impositivo
235 text += self._formatNumber(tax_line.tax_percentage * 100, 3, 2)234 text += self._formatNumber(tax_line.tax_percentage * 100, 3, 2)
236 # Base imponible235 # Base imponible
@@ -252,7 +251,12 @@
252 text += self._formatNumber(invoice_issued.invoice_id.number_tickets, 8)251 text += self._formatNumber(invoice_issued.invoice_id.number_tickets, 8)
253 else: text += self._formatNumber(1, 8)252 else: text += self._formatNumber(1, 8)
254 # Número de registros (Desglose)253 # Número de registros (Desglose)
255 text += self._formatNumber(len(invoice_issued.tax_line_ids), 2)254 # Si una rectificativa lleva varios tipos de impuesto,
255 # se debe declarar con clave D y registros 1 (como si fueran facturas individuales)
256 if clave_operacion == 'D':
257 text += self._formatNumber(1, 2)
258 else:
259 text += self._formatNumber(len(invoice_issued.tax_line_ids), 2)
256 # Intervalo de identificación de la acumulación260 # Intervalo de identificación de la acumulación
257 if invoice_issued.invoice_id.is_ticket_summary == 1: 261 if invoice_issued.invoice_id.is_ticket_summary == 1:
258 text += self._formatString(invoice_issued.invoice_id.first_ticket, 40)262 text += self._formatString(invoice_issued.invoice_id.first_ticket, 40)
@@ -262,9 +266,9 @@
262 text += self._formatString( ",".join( [x.number for x in \266 text += self._formatString( ",".join( [x.number for x in \
263 invoice_issued.invoice_id.origin_invoices_ids]) , 40 )267 invoice_issued.invoice_id.origin_invoices_ids]) , 40 )
264 # Tipo Recargo de equivalencia268 # Tipo Recargo de equivalencia
265 text += self._formatNumber(0, 5) 269 text += self._formatNumber(tax_line.surcharge_percentage, 3, 2)
266 # Couta del recargo de equivalencia 270 # Couta del recargo de equivalencia
267 text += ' '+self._formatNumber(0, 11, 2) 271 text += self._formatNumber(tax_line.surcharge_amount, 11, 2,True)
268 #Situación del Inmueble #TODO272 #Situación del Inmueble #TODO
269 text += '0'273 text += '0'
270 #Referencia Catastral #TODO274 #Referencia Catastral #TODO
@@ -305,8 +309,9 @@
305 78 Clave de identificación en el país de residencia309 78 Clave de identificación en el país de residencia
306 79-95 Número de identificación fiscal en el país de residencia. TODO de momento blancos.310 79-95 Número de identificación fiscal en el país de residencia. TODO de momento blancos.
307 96-98 Blancos311 96-98 Blancos
308 99 Clave tipo de libro. Constante 'R'.312 99 Clave tipo de libro.
309 100 Clave de operación. Constante ' ' para un solo tipo de IVA. Constante 'C' para varios tipos de IVA. TODO Resto de operaciones. Varios tipos impositivos.313 100 Clave de operación. Constante ' ' para un solo tipo de IVA. Recuperado de los impuestos de la factura.
314 Constante 'C' para varios tipos de IVA.
310 101-108 Fecha de expedición315 101-108 Fecha de expedición
311 109-116 Fecha de operación. Se consigna la misma que expedición. TODO. Fecha del uso del bien.316 109-116 Fecha de operación. Se consigna la misma que expedición. TODO. Fecha del uso del bien.
312 117-121 Tipo impositivo317 117-121 Tipo impositivo
@@ -354,19 +359,18 @@
354 else: text += 17*' '359 else: text += 17*' '
355 # Blancos360 # Blancos
356 text += 3*' ' 361 text += 3*' '
357 # Clave tipo de libro. Constante 'R'. 362 # Clave tipo de libro.
358 text += 'R' 363 ledger_key = invoice_received.ledger_key
364 if ledger_key in ('I','J'):
365 ledger_key = 'R'
366 text += self._formatString(ledger_key, 1)
359 # Clave de operación367 # Clave de operación
360 if len(invoice_received.tax_line_ids) > 1: text += 'C' 368 if len(invoice_received.tax_line_ids) > 1 and invoice_received.operation_key not in ('P','I'): text += 'C'
361 else: text += ' '369 else: text += self._formatString(invoice_received.operation_key, 1)
362 # Fecha de expedición370 # Fecha de expedición
363 text += self._formatNumber(invoice_received.invoice_id.date_invoice.split('-')[0], 4)371 text += self._formatDate(invoice_received.invoice_id.date_invoice)
364 text += self._formatNumber(invoice_received.invoice_id.date_invoice.split('-')[1], 2)
365 text += self._formatNumber(invoice_received.invoice_id.date_invoice.split('-')[2], 2)
366 # Fecha de operación 372 # Fecha de operación
367 text += self._formatNumber(invoice_received.invoice_id.date_invoice.split('-')[0], 4)373 text += self._formatDate(invoice_received.invoice_id.date_invoice)
368 text += self._formatNumber(invoice_received.invoice_id.date_invoice.split('-')[1], 2)
369 text += self._formatNumber(invoice_received.invoice_id.date_invoice.split('-')[2], 2)
370 #Tipo impositivo374 #Tipo impositivo
371 text += self._formatNumber(tax_line.tax_percentage * 100, 3, 2) 375 text += self._formatNumber(tax_line.tax_percentage * 100, 3, 2)
372 # Base imponible 376 # Base imponible
@@ -406,6 +410,127 @@
406 410
407 assert len(text) == 502*len(invoice_received.tax_line_ids), _("The type 2 received record must be 500 characters long for each Vat registry")411 assert len(text) == 502*len(invoice_received.tax_line_ids), _("The type 2 received record must be 500 characters long for each Vat registry")
408 return text412 return text
413
414
415 def _get_formatted_invoice_investment(self, cr, uid, report, invoice_investment):
416 """
417 Returns a type 2, investment goods invoice, formated record
418
419 Format of the record:
420 Tipo de Registro 2 – Registro de facturas de bienes de inversión
421 Posiciones Descripción
422 1 Tipo de Registro
423 2-4 Modelo Declaración
424 5-8 Ejercicio
425 9-17 NIF del declarante
426 18-26 NIF del declarado
427 27-35 NIF del representante legal
428 36-75 Apellidos y nombre, razón social o
429 denominación del declarado
430 76-77 Código país
431 78 Clave de identificación en el país de residencia
432 79-95 Número de identificación fiscal en el país de
433 residencia. TODO de momento blancos.
434 96-98 Blancos
435 99 Clave tipo de libro. 'I' o 'J' (IGIC), según impuesto.
436 100 Clave de operación. Recuperado de los impuestos de la factura.
437 Constante 'C' para varios tipos de IVA.
438 101-108 Fecha de expedición
439 109-116 Fecha de operación. Se consigna la misma que
440 expedición. TODO. Fecha del uso del bien.
441 117-121 Tipo impositivo
442 122-135 Base imponible
443 136-149 Cuota del impuesto
444 150-163 Importe total de la factura
445 164-177 Base imponible a coste. TODO de momento 0.
446 178-217 Identificación de la factura
447 218-235 Número de registro
448 236-238 Prorrata anual definitiva
449 239-252 Regularización anual de la deducción TODO
450 253-292 Identificación de la entrega
451 293-306 Regularización anual de la deducción efectuada TODO
452 307-314 Fecha de inicio de la utilización
453 315-331 Identificación del bien
454 332-500 BLANCO
455
456 """
457 text = ''
458 for tax_line in invoice_investment.tax_line_ids:
459 # Tipo de Registro
460 text += '2'
461 # Modelo Declaración
462 text += '340'
463 # Ejercicio
464 text += self._formatString(report.fiscalyear_id.code, 4)
465 # NIF del declarante
466 text += self._formatString(report.company_vat, 9)
467 # NIF del declarado
468 if invoice_investment.partner_country_code == 'ES':
469 text += self._formatString(invoice_investment.partner_vat, 9)
470 else: text += self._formatString(' ', 9)
471 # NIF del representante legal
472 text += self._formatString(invoice_investment.representative_vat, 9)
473 # Apellidos y nombre, razón social o denominación del declarado
474 text += self._formatString(invoice_investment.partner_id.name, 40)
475 # Código país
476 text += self._formatString(invoice_investment.partner_country_code, 2)
477 # Clave de identificación en el país de residencia
478 text += self._formatNumber(invoice_investment.partner_id.vat_type, 1)
479 # Número de identificación fiscal en el país de residencia.
480 if invoice_investment.partner_country_code != 'ES':
481 text += self._formatString(invoice_investment.partner_country_code, 2)
482 text += self._formatString(invoice_investment.partner_vat, 15)
483 else: text += 17 * ' '
484 # Blancos
485 text += 3 * ' '
486 # Clave tipo de libro. 'I' o 'J' (IGIC), según impuesto.
487 text += self._formatString(invoice_investment.ledger_key, 1)
488 # Clave de operación
489 if len(invoice_investment.tax_line_ids) > 1 and invoice_investment.operation_key not in ('P','I'): text += 'C'
490 else: text += self._formatString(invoice_investment.operation_key, 1)
491
492 text += self._formatDate(invoice_investment.invoice_id.date_invoice)
493 text += self._formatDate(invoice_investment.invoice_id.date_invoice)
494 #Tipo impositivo
495 text += self._formatNumber(tax_line.tax_percentage * 100, 3, 2)
496 # Base imponible
497 text += self._formatNumber(tax_line.base_amount, 11, 2, True)
498 # Cuota del impuesto
499 text += self._formatNumber(tax_line.tax_amount, 11, 2, True)
500 # Importe total de la factura
501 text += self._formatNumber(tax_line.tax_amount+
502 tax_line.base_amount, 11, 2, True)
503 # Base imponible a coste.
504 text += ' '+self._formatNumber(0, 11, 2)
505 # Identificación de la factura
506 text += self._formatString(invoice_investment.invoice_id.number, 40)
507 # Número de registro
508 sequence_obj = self.pool.get('ir.sequence')
509 text += self._formatString(sequence_obj.get(cr, uid, 'mod340'), 18)
510 #Prorrata anual definitiva
511 text += self._formatNumber(invoice_investment.prorata, 3, 0)
512 #Regularización anual de la deducción TODO
513 text += ' ' + '0'*13
514 #Identificación de la entrega
515# Se consignarán la identificación de la factura que
516# corresponde en el LIBRO REGISTRO DE FACTURAS
517# EXPEDIDAS que recoge la entrega.
518# Esto qué es? la referencia del proveedor??
519 text += self._formatString(invoice_investment.invoice_id.reference, 40)
520 #Regularización de la deducción efectuada (transmisiones) TODO
521 text += ' ' + '0'*13
522 #Fecha de inicio de la utilización
523 text += self._formatDate(invoice_investment.use_date)
524 #Identificación del bien
525 text += self._formatString(tax_line.goods_identification, 17)
526 #Blancos
527 text += ' '*169
528 text += '\r\n'
529 assert len(text) == 502 * len(invoice_investment.tax_line_ids), _("The type 2 issued record must be 500 characters long for each Vat registry")
530 return text
531
532
533
409 534
410 def _get_formatted_other_records(self, cr, uid, report,context=None):535 def _get_formatted_other_records(self, cr, uid, report,context=None):
411 file_contents = ''536 file_contents = ''
@@ -413,10 +538,19 @@
413 for invoice_issued in report.issued:538 for invoice_issued in report.issued:
414 file_contents += self._get_formatted_invoice_issued(cr,uid,report, 539 file_contents += self._get_formatted_invoice_issued(cr,uid,report,
415 invoice_issued)540 invoice_issued)
416541
417 for invoice_received in report.received:542 for invoice_received in report.received:
418 file_contents += self._get_formatted_invoice_received(cr,uid,543 file_contents += self._get_formatted_invoice_received(cr,uid,
419 report, invoice_received)544 report, invoice_received)
545
546 if report.investment_goods_prorating:
547 for invoice_investment in report.investment:
548 file_contents += self._get_formatted_invoice_investment(cr,uid,
549 report, invoice_investment)
550 else:
551 for invoice_investment in report.investment:
552 file_contents += self._get_formatted_invoice_received(cr,uid,
553 report, invoice_investment)
420554
421 return file_contents555 return file_contents
422556