odoo-addon-l10n-es-vat-book 18.0.2.0.1.3__py3-none-any.whl → 18.0.2.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,16 +2,16 @@
2
2
  :target: https://odoo-community.org/get-involved?utm_source=readme
3
3
  :alt: Odoo Community Association
4
4
 
5
- ============
6
- Libro de IVA
7
- ============
5
+ ==================================
6
+ Libros registro del IVA y del IRPF
7
+ ==================================
8
8
 
9
9
  ..
10
10
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
11
11
  !! This file is generated by oca-gen-addon-readme !!
12
12
  !! changes will be overwritten. !!
13
13
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
14
- !! source digest: sha256:8b15c846d57c2b4978cc7506c4ada6400d13d1072d1dec4d22590b7e7e9a90ed
14
+ !! source digest: sha256:df2894f85a707364acdb7106ab99c3505929e5e14752c235796df60c96f9a31d
15
15
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
16
16
 
17
17
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -32,10 +32,10 @@ Libro de IVA
32
32
 
33
33
  |badge1| |badge2| |badge3| |badge4| |badge5|
34
34
 
35
- Módulo que calcula el libro de IVA español.
35
+ Módulo que calcula los libros de IVA e IRPF español.
36
36
 
37
- Esto módulo introduce el menú "Libro de IVA" en Contabilidad -> Informe
38
- -> Declaraciones AEAT -> Libro de IVA.
37
+ Esto módulo introduce el menú "Libros de IVA y del IRPF" en Contabilidad
38
+ -> Informe -> Declaraciones AEAT.
39
39
 
40
40
  Es posible visualizar e imprimir por separado:
41
41
 
@@ -99,6 +99,9 @@ Funcionalidades del Libro Registro de IVA no incluídas por el momento:
99
99
  - Criterio de caja
100
100
  - Regímenes especiales de seguros, de agencias de viaje o de bienes
101
101
  usados.
102
+ - Clave de operación.
103
+ - Deducible en periodo posterior.
104
+ - Actividad
102
105
 
103
106
  Bug Tracker
104
107
  ===========
@@ -131,6 +134,7 @@ Contributors
131
134
  - Pedro M. Baeza
132
135
  - Carlos Dauden
133
136
  - Ernesto Tejeda
137
+ - Eduardo Ezerouali
134
138
 
135
139
  - Omar Castiñeira <omar@comunitea.com>
136
140
  - Fernando La Chica <fernandolachica@gmail.com>
@@ -6,11 +6,12 @@
6
6
  # Copyright 2020 Tecnativa - Carlos Daudén
7
7
  # Copyright 2022 Comunitea - Omar Castiñeira
8
8
  # Copyright 2018,2023,2025 Tecnativa - Pedro M. Baeza
9
+ # Copyright 2026 Tecnativa - Eduardo Ezerouali
9
10
  # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
10
11
 
11
12
  {
12
- "name": "Libro de IVA",
13
- "version": "18.0.2.0.1",
13
+ "name": "Libros registro del IVA y del IRPF",
14
+ "version": "18.0.2.1.0",
14
15
  "author": "PRAXYA, ForgeFlow, Tecnativa, Odoo Community Association (OCA)",
15
16
  "website": "https://github.com/OCA/l10n-spain",
16
17
  "license": "AGPL-3",
@@ -1,6 +1,8 @@
1
1
  id,excluded_account_xmlid_id:id,book_type,fee_amount_xlsx_column,fee_type_xlsx_column,name,special_tax_group,tax_agency_ids/id,tax_xmlid_ids/id
2
- aeat_vat_book_map_line_s_iva,,"issued","O","N","IVA repercutido","","l10n_es_aeat.aeat_tax_agency_spain","s_iva0b,s_iva0s,s_iva2b,s_iva2s,s_iva4b,s_iva4s,s_iva5b,s_iva5s,s_iva7-5b,s_iva7-5s,s_iva10b,s_iva10s,s_iva21b,s_iva21s,s_iva0_isp,s_iva0_sp_i,s_iva0_g_i,s_iva0_g_e,s_iva0,s_iva0_art22,s_iva0_art23,s_iva0_e,s_iva0_ic,s_iva0_nsd,s_iva_ns,s_iva_ns_b,s_iva_e"
3
- aeat_vat_book_map_line_p_iva,"common_477","received","P","O","IVA soportado","","l10n_es_aeat.aeat_tax_agency_spain","p_iva0_s_bc,p_iva0_s_sc,p_iva2_bc,p_iva2_sc,p_iva4_bc,p_iva4_sc,p_iva4_bi,p_iva5_bc,p_iva5_sc,p_iva7-5_bc,p_iva7-5_sc,p_iva10_bc,p_iva10_sc,p_iva10_bi,p_iva21_bc,p_iva21_sc,p_iva21_bi,p_iva0_bc,p_iva0_ic_sc,p_iva2_ic_sc,p_iva4_sp_in,p_iva5_ic_sc,p_iva7-5_ic_sc,p_iva10_sp_in,p_iva21_sp_in,p_iva0_ic_bc,p_iva2_ic_bc,p_iva4_ic_bc,p_iva5_ic_bc,p_iva7-5_ic_bc,p_iva10_ic_bc,p_iva21_ic_bc,p_iva4_ic_bi,p_iva10_ic_bi,p_iva21_ic_bi,p_iva0_ibc,p_iva2_ibc,p_iva4_ibc,p_iva5_ibc,p_iva7-5_ibc,p_iva10_ibc,p_iva21_ibc,p_iva12_agr,p_iva21_isp,p_iva10_isp,p_iva4_isp,p_iva21_isp_bi,p_iva10_isp_bi,p_iva4_isp_bi,p_iva21_sp_ex,p_iva10_sp_ex,p_iva7-5_isc,p_iva5_isc,p_iva4_sp_ex,p_iva2_isc,p_iva0_isc,p_iva4_bi,p_iva10_bi,p_iva21_bi,p_iva0_ns,p_iva0_ns_b,p_iva21_ibc_group,p_iva4_ibc_group,p_iva10_ibc_group,p_dua_exempt"
2
+ aeat_vat_book_map_line_s_iva,,"issued","X","W","IVA repercutido","","l10n_es_aeat.aeat_tax_agency_spain","s_iva0b,s_iva0s,s_iva2b,s_iva2s,s_iva4b,s_iva4s,s_iva5b,s_iva5s,s_iva7-5b,s_iva7-5s,s_iva10b,s_iva10s,s_iva21b,s_iva21s,s_iva0_isp,s_iva0_sp_i,s_iva0_g_i,s_iva0_g_e,s_iva0,s_iva0_art22,s_iva0_art23,s_iva0_e,s_iva0_ic,s_iva0_nsd,s_iva_ns,s_iva_ns_b,s_iva_e"
3
+ aeat_vat_book_map_line_p_iva,"common_477","received","AC","AB","IVA soportado","","l10n_es_aeat.aeat_tax_agency_spain","p_iva0_s_bc,p_iva0_s_sc,p_iva2_bc,p_iva2_sc,p_iva4_bc,p_iva4_sc,p_iva4_bi,p_iva5_bc,p_iva5_sc,p_iva7-5_bc,p_iva7-5_sc,p_iva10_bc,p_iva10_sc,p_iva10_bi,p_iva21_bc,p_iva21_sc,p_iva21_bi,p_iva0_bc,p_iva0_ic_sc,p_iva2_ic_sc,p_iva4_sp_in,p_iva5_ic_sc,p_iva7-5_ic_sc,p_iva10_sp_in,p_iva21_sp_in,p_iva0_ic_bc,p_iva2_ic_bc,p_iva4_ic_bc,p_iva5_ic_bc,p_iva7-5_ic_bc,p_iva10_ic_bc,p_iva21_ic_bc,p_iva4_ic_bi,p_iva10_ic_bi,p_iva21_ic_bi,p_iva0_ibc,p_iva2_ibc,p_iva4_ibc,p_iva5_ibc,p_iva7-5_ibc,p_iva10_ibc,p_iva21_ibc,p_iva12_agr,p_iva21_isp,p_iva10_isp,p_iva4_isp,p_iva21_isp_bi,p_iva10_isp_bi,p_iva4_isp_bi,p_iva21_sp_ex,p_iva10_sp_ex,p_iva7-5_isc,p_iva5_isc,p_iva4_sp_ex,p_iva2_isc,p_iva0_isc,p_iva4_bi,p_iva10_bi,p_iva21_bi,p_iva0_ns,p_iva0_ns_b,p_iva21_ibc_group,p_iva4_ibc_group,p_iva10_ibc_group,p_dua_exempt"
4
4
  aeat_vat_book_map_line_p_iva_nd,"common_472","received",,,"IVA soportado no deducible","","l10n_es_aeat.aeat_tax_agency_spain","p_iva2_nd,p_iva4_nd,p_iva5_nd,p_iva7-5_nd,p_iva10_nd,p_iva0_nd"
5
- aeat_vat_book_map_line_s_req,,"issued","Q","P","Recargo Eq.","req","l10n_es_aeat.aeat_tax_agency_spain","s_req0,s_req05,s_req062,s_req014,s_req52"
6
- aeat_vat_book_map_line_p_req,,"received","S","R","Recargo Eq.","req","l10n_es_aeat.aeat_tax_agency_spain","p_req0,p_req05,p_req062,p_req014,p_req52"
5
+ aeat_vat_book_map_line_s_req,,"issued","Z","Y","Recargo Eq.","req","l10n_es_aeat.aeat_tax_agency_spain","s_req0,s_req05,s_req062,s_req014,s_req52"
6
+ aeat_vat_book_map_line_p_req,,"received","AF","AE","Recargo Eq.","req","l10n_es_aeat.aeat_tax_agency_spain","p_req0,p_req05,p_req062,p_req014,p_req52"
7
+ aeat_vat_book_map_line_s_irpf,,"issued","AF","AE","Retención del IRPF","irpf","l10n_es_aeat.aeat_tax_agency_spain","s_irpf1,s_irpf2,s_irpf7,s_irpf9,s_irpf15,s_irpf18,s_irpf19,s_irpf19a,s_irpf195a,s_irpf20,s_irpf20a,s_irpf21,s_irpf21a,s_irpf24,s_irpf24_rdc,s_irpfnrue0,s_irpfnrnue0,s_irpfnrnue24,s_irpfnrue19"
8
+ aeat_vat_book_map_line_p_irpf,,"received","AL","AK","Retención del IRPF","irpf","l10n_es_aeat.aeat_tax_agency_spain","p_irpf1,p_irpf2,p_irpf7,p_irpf7e,p_irpf9,p_irpf15,p_irpf15e,p_irpf18,p_irpf19,p_irpf19a,p_irpf19ca,p_irpf19cs,p_irpf195a,p_irpf20,p_irpf20a,p_irpf21a,p_irpf21p,p_irpf21t,p_irpf21td,p_irpf21te,p_irpf24,p_irpf24_rdc,p_irpf35cya,p_irpfnrue0p,p_irpfnrnue24p,p_irpfnrue19p,p_rp19,p_rrD19"
@@ -104,3 +104,50 @@ p_iva21_ibc_group,account_tax_template_p_iva21_ibc_group
104
104
  p_iva4_ibc_group,account_tax_template_p_iva4_ibc_group
105
105
  p_iva10_ibc_group,account_tax_template_p_iva10_ibc_group
106
106
  p_dua_exempt,account_tax_template_p_dua_exempt
107
+ s_irpf1,account_tax_template_s_irpf1
108
+ p_irpf1,account_tax_template_p_irpf1
109
+ s_irpf2,account_tax_template_s_irpf2
110
+ p_irpf2,account_tax_template_p_irpf2
111
+ s_irpf7,account_tax_template_s_irpf7
112
+ p_irpf7,account_tax_template_p_irpf7
113
+ p_irpf7e,account_tax_template_p_irpf7e
114
+ s_irpf9,account_tax_template_s_irpf9
115
+ p_irpf9,account_tax_template_p_irpf9
116
+ s_irpf15,account_tax_template_s_irpf15
117
+ p_irpf15,account_tax_template_p_irpf15
118
+ p_irpf15e,account_tax_template_p_irpf15e
119
+ s_irpf18,account_tax_template_s_irpf18
120
+ p_irpf18,account_tax_template_p_irpf18
121
+ s_irpf19,account_tax_template_s_irpf19
122
+ s_irpf19a,account_tax_template_s_irpf19a
123
+ s_irpf195a,account_tax_template_s_irpf195a
124
+ p_irpf19,account_tax_template_p_irpf19
125
+ p_irpf19a,account_tax_template_p_irpf19a
126
+ p_irpf19ca,account_tax_template_p_irpf19ca
127
+ p_irpf19cs,account_tax_template_p_irpf19cs
128
+ p_irpf195a,account_tax_template_p_irpf195a
129
+ s_irpf20,account_tax_template_s_irpf20
130
+ s_irpf20a,account_tax_template_s_irpf20a
131
+ p_irpf20,account_tax_template_p_irpf20
132
+ p_irpf20a,account_tax_template_p_irpf20a
133
+ s_irpf21,account_tax_template_s_irpf21
134
+ s_irpf21a,account_tax_template_s_irpf21a
135
+ p_irpf21a,account_tax_template_p_irpf21a
136
+ p_irpf21p,account_tax_template_p_irpf21p
137
+ p_irpf21t,account_tax_template_p_irpf21t
138
+ p_irpf21td,account_tax_template_p_irpf21td
139
+ p_irpf21te,account_tax_template_p_irpf21te
140
+ s_irpf24,account_tax_template_s_irpf24
141
+ s_irpf24_rdc,account_tax_template_s_irpf24_rdc
142
+ p_irpf24,account_tax_template_p_irpf24
143
+ p_irpf24_rdc,account_tax_template_p_irpf24_rdc
144
+ p_irpf35cya,account_tax_template_p_irpf35cya
145
+ s_irpfnrue0,account_tax_template_s_irpfnrue0
146
+ s_irpfnrnue0,account_tax_template_s_irpfnrnue0
147
+ p_irpfnrue0p,account_tax_template_p_irpfnrue0p
148
+ s_irpfnrnue24,account_tax_template_s_irpfnrnue24
149
+ p_irpfnrnue24p,account_tax_template_p_irpfnrnue24p
150
+ s_irpfnrue19,account_tax_template_s_irpfnrue19
151
+ p_irpfnrue19p,account_tax_template_p_irpfnrue19p
152
+ p_rp19,account_tax_template_p_rp19
153
+ p_rrD19,account_tax_template_p_rrD19
@@ -446,7 +446,7 @@ msgstr ""
446
446
 
447
447
  #. module: l10n_es_vat_book
448
448
  #: model:ir.ui.menu,name:l10n_es_vat_book.menu_vat_book_report
449
- msgid "Libro de IVA"
449
+ msgid "Libros del IVA y del IRPF"
450
450
  msgstr ""
451
451
 
452
452
  #. module: l10n_es_vat_book
@@ -469,6 +469,11 @@ msgstr ""
469
469
  msgid "Model number"
470
470
  msgstr ""
471
471
 
472
+ #. module: l10n_es_vat_book
473
+ #: model:ir.model.fields.selection,name:l10n_es_vat_book.selection__l10n_es_vat_book__vat_settlement_period__monthly
474
+ msgid "Monthly"
475
+ msgstr ""
476
+
472
477
  #. module: l10n_es_vat_book
473
478
  #: model:ir.model.fields,field_description:l10n_es_vat_book.field_l10n_es_vat_book_line_tax__move_line_ids
474
479
  #: model_terms:ir.ui.view,arch_db:l10n_es_vat_book.view_vat_book_line_form
@@ -560,6 +565,11 @@ msgstr ""
560
565
  msgid "Previous declaration number"
561
566
  msgstr ""
562
567
 
568
+ #. module: l10n_es_vat_book
569
+ #: model:ir.model.fields.selection,name:l10n_es_vat_book.selection__l10n_es_vat_book__vat_settlement_period__quarterly
570
+ msgid "Quarterly"
571
+ msgstr ""
572
+
563
573
  #. module: l10n_es_vat_book
564
574
  #: model:ir.model.fields.selection,name:l10n_es_vat_book.selection__l10n_es_vat_book_line_tax__special_tax_group__req
565
575
  msgid "R.Eq."
@@ -870,6 +880,11 @@ msgstr ""
870
880
  msgid "Vat Number Xlsx"
871
881
  msgstr ""
872
882
 
883
+ #. module: l10n_es_vat_book
884
+ #: model:ir.model.fields,field_description:l10n_es_vat_book.field_l10n_es_vat_book__vat_settlement_period
885
+ msgid "Vat Settlement Period"
886
+ msgstr ""
887
+
873
888
  #. module: l10n_es_vat_book
874
889
  #: model:ir.actions.report,name:l10n_es_vat_book.act_report_vat_book_invoices_issued_html
875
890
  #: model:ir.actions.report,name:l10n_es_vat_book.act_report_vat_book_invoices_issued_pdf
@@ -122,6 +122,11 @@ class L10nEsVatBook(models.Model):
122
122
  error_count = fields.Integer(
123
123
  compute="_compute_error_count",
124
124
  )
125
+ vat_settlement_period = fields.Selection(
126
+ selection=[("monthly", "Monthly"), ("quarterly", "Quarterly")],
127
+ default="monthly",
128
+ required=True,
129
+ )
125
130
 
126
131
  def _compute_error_count(self):
127
132
  vat_book_exception_group = self.env["l10n.es.vat.book.line"].read_group(
@@ -458,19 +463,13 @@ class L10nEsVatBook(models.Model):
458
463
  if account:
459
464
  accounts.update({tax: account for tax in line_taxes})
460
465
  # Filter in all possible data using sets for improving performance
461
- if accounts:
462
- lines = moves.filtered(
463
- lambda line: line.tax_ids & taxes
464
- or (
465
- line.tax_line_id in taxes
466
- and accounts.get(line.tax_line_id, line.account_id)
467
- != line.account_id
468
- )
469
- )
470
- else:
471
- lines = moves.filtered(
472
- lambda line: (line.tax_ids | line.tax_line_id) & taxes
466
+ lines = moves.filtered(
467
+ lambda line: line.tax_ids & taxes
468
+ or (
469
+ line.tax_line_id in taxes
470
+ and accounts.get(line.tax_line_id) != line.account_id
473
471
  )
472
+ )
474
473
  if map_lines:
475
474
  rec.create_vat_book_lines(lines, map_lines[:1].book_type, taxes)
476
475
  # Issued
@@ -2,8 +2,10 @@
2
2
  # Daniel Rodriguez Lijo <drl.9319@gmail.com>
3
3
  # Copyright 2017 ForgeFlow, S.L. <contact@forgeflow.com>
4
4
  # Copyright 2019 Tecnativa - Carlos Dauden
5
+ # Copyright 2026 Tecnativa - Eduardo Ezerouali
5
6
  # License AGPL-3 - See https://www.gnu.org/licenses/agpl-3.0
6
7
 
8
+
7
9
  from odoo import api, fields, models
8
10
 
9
11
 
@@ -64,3 +66,11 @@ class L10nEsVatBookLine(models.Model):
64
66
  def _compute_tax_rate(self):
65
67
  for rec in self:
66
68
  rec.tax_rate = rec.tax_id.amount
69
+
70
+ def _get_settlement_period(self):
71
+ self.ensure_one()
72
+ month = self.move_id.date.month
73
+ if self.vat_book_id.vat_settlement_period == "quarterly":
74
+ return f"{int(((month - 1) / 3) + 1)}T"
75
+ else:
76
+ return f"{month:02d}"
@@ -5,6 +5,7 @@
5
5
  - Pedro M. Baeza
6
6
  - Carlos Dauden
7
7
  - Ernesto Tejeda
8
+ - Eduardo Ezerouali
8
9
  - Omar Castiñeira \<<omar@comunitea.com>\>
9
10
  - Fernando La Chica \<<fernandolachica@gmail.com>\>
10
11
  - Victor Garcia \<<victor.garcia@kayuulab.com>\>
@@ -1,7 +1,7 @@
1
- Módulo que calcula el libro de IVA español.
1
+ Módulo que calcula los libros de IVA e IRPF español.
2
2
 
3
- Esto módulo introduce el menú "Libro de IVA" en Contabilidad -\> Informe
4
- -\> Declaraciones AEAT -\> Libro de IVA.
3
+ Esto módulo introduce el menú "Libros de IVA y del IRPF" en Contabilidad -\> Informe
4
+ -\> Declaraciones AEAT.
5
5
 
6
6
  Es posible visualizar e imprimir por separado:
7
7
 
@@ -3,3 +3,6 @@ Funcionalidades del Libro Registro de IVA no incluídas por el momento:
3
3
  - Criterio de caja
4
4
  - Regímenes especiales de seguros, de agencias de viaje o de bienes
5
5
  usados.
6
+ - Clave de operación.
7
+ - Deducible en periodo posterior.
8
+ - Actividad
@@ -1,4 +1,5 @@
1
1
  # Copyright 2019 Tecnativa - Carlos Dauden
2
+ # Copyright 2026 Tecnativa - Eduardo Ezerouali
2
3
  # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
3
4
 
4
5
  from odoo import fields, models
@@ -62,37 +63,49 @@ class VatNumberXlsx(models.AbstractModel):
62
63
  sheet.write("A3", f"NIF: {book.company_vat}")
63
64
  sheet.write("A4:D4", f"NOMBRE/RAZÓN SOCIAL: {book.company_id.name}")
64
65
 
65
- sheet.merge_range("C6:E6", "Identificación de la Factura", header_format)
66
- sheet.merge_range("F6:H6", "NIF Destinatario", header_format)
66
+ sheet.merge_range("A6:B6", "Autoliquidación", header_format)
67
+ sheet.merge_range("C6:E6", "Actividad", header_format)
68
+ sheet.merge_range("K6:M6", "Identificación de la Factura", header_format)
69
+ sheet.merge_range("N6:P6", "NIF Destinatario", header_format)
67
70
 
68
- sheet.merge_range("A6:A7", "Fecha Expedición", header_format)
69
- sheet.merge_range("B6:B7", "Fecha Operación", header_format)
70
- sheet.write("C7", "Serie", subheader_format)
71
- sheet.write("D7", "Número", subheader_format)
72
- sheet.write("E7", "Número-Final", subheader_format)
73
- sheet.write("F7", "Tipo", subheader_format)
74
- sheet.write("G7", "Código País", subheader_format)
75
- sheet.write("H7", "Identificación", subheader_format)
76
- sheet.merge_range("I6:I7", "Nombre Destinatario", header_format)
77
- sheet.merge_range("J6:J7", "Factura Sustitutiva", header_format)
78
- sheet.merge_range("K6:K7", "Clave de Operación", header_format)
79
- sheet.merge_range("L6:L7", "Total Factura", header_format)
80
- sheet.merge_range("M6:M7", "Base Imponible", header_format)
81
- sheet.merge_range("N6:N7", "Tipo de IVA", header_format)
82
- sheet.merge_range("O6:O7", "Cuota IVA Repercutida", header_format)
83
- last_col = "O"
71
+ sheet.write("A7", "Ejercicio", subheader_format)
72
+ sheet.write("B7", "Periodo", subheader_format)
73
+ sheet.write("C7", "Código", subheader_format)
74
+ sheet.write("D7", "Tipo", subheader_format)
75
+ sheet.write("E7", "Grupo o Epígrafe del IAE", subheader_format)
76
+ sheet.merge_range("F6:F7", "Tipo de factura", header_format)
77
+ sheet.merge_range("G6:G7", "Concepto de Ingreso", header_format)
78
+ sheet.merge_range("H6:H7", "Ingreso Computable", header_format)
79
+ sheet.merge_range("I6:I7", "Fecha Expedición", header_format)
80
+ sheet.merge_range("J6:J7", "Fecha Operación", header_format)
81
+ sheet.write("K7", "Serie", subheader_format)
82
+ sheet.write("L7", "Número", subheader_format)
83
+ sheet.write("M7", "Número-Final", subheader_format)
84
+ sheet.write("N7", "Tipo", subheader_format)
85
+ sheet.write("O7", "Código País", subheader_format)
86
+ sheet.write("P7", "Identificación", subheader_format)
87
+ sheet.merge_range("Q6:Q7", "Nombre Destinatario", header_format)
88
+ sheet.merge_range("R6:R7", "Clave de Operación", header_format)
89
+ sheet.merge_range("S6:S7", "Calificación de la operación", header_format)
90
+ sheet.merge_range("T6:T7", "Operación Exenta", header_format)
91
+ sheet.merge_range("U6:U7", "Total Factura", header_format)
92
+ sheet.merge_range("V6:V7", "Base Imponible", header_format)
93
+ sheet.merge_range("W6:W7", "Tipo de IVA", header_format)
94
+ sheet.merge_range("X6:X7", "Cuota IVA Repercutida", header_format)
95
+ last_col = "X"
84
96
  for line in self._get_vat_book_map_lines("issued"):
85
- sheet.merge_range(
86
- f"{line.fee_type_xlsx_column}6:{line.fee_type_xlsx_column}7",
87
- f"Tipo de {line.name}",
88
- header_format,
89
- )
90
- sheet.merge_range(
91
- f"{line.fee_amount_xlsx_column}6:{line.fee_amount_xlsx_column}7",
92
- f"Cuota {line.name}",
93
- header_format,
94
- )
95
- last_col = line.fee_amount_xlsx_column
97
+ if line.special_tax_group != "irpf":
98
+ sheet.merge_range(
99
+ f"{line.fee_type_xlsx_column}6:{line.fee_type_xlsx_column}7",
100
+ f"Tipo de {line.name}",
101
+ header_format,
102
+ )
103
+ sheet.merge_range(
104
+ f"{line.fee_amount_xlsx_column}6:{line.fee_amount_xlsx_column}7",
105
+ f"Cuota {line.name}",
106
+ header_format,
107
+ )
108
+ last_col = line.fee_amount_xlsx_column
96
109
  next_col = excel_col_number(last_col) + 1
97
110
  # Las filas empiezan por 0, por eso se resta 1
98
111
  sheet.merge_range(
@@ -110,18 +123,37 @@ class VatNumberXlsx(models.AbstractModel):
110
123
  sheet.write(6, next_col, "Medio Utilizado", subheader_format)
111
124
  next_col += 1
112
125
  sheet.write(6, next_col, "Identificación Medio Utilizado", subheader_format)
126
+ next_col += 1
127
+ sheet.merge_range(
128
+ 5,
129
+ next_col,
130
+ 6,
131
+ next_col,
132
+ "Tipo de Retención del IRPF",
133
+ header_format,
134
+ )
135
+ next_col += 1
136
+ sheet.merge_range(
137
+ 5,
138
+ next_col,
139
+ 6,
140
+ next_col,
141
+ "Importe Retenido del IRPF",
142
+ header_format,
143
+ )
113
144
 
114
- sheet.set_column("A:B", 16, date_format)
115
- sheet.set_column("C:C", 14)
116
- sheet.set_column("D:D", 17)
117
- sheet.set_column("E:E", 17)
118
- sheet.set_column("F:F", 8)
119
- sheet.set_column("G:G", 12)
120
- sheet.set_column("H:H", 14)
121
- sheet.set_column("I:I", 40)
122
- sheet.set_column("J:J", 16)
123
- sheet.set_column("K:K", 16)
124
- sheet.set_column("L:Q", 14, decimal_format)
145
+ sheet.set_column("A:G", 14)
146
+ sheet.set_column("H:H", 16, decimal_format)
147
+ sheet.set_column("I:J", 16, date_format)
148
+ sheet.set_column("K:K", 14)
149
+ sheet.set_column("L:L", 17)
150
+ sheet.set_column("M:M", 17)
151
+ sheet.set_column("N:N", 8)
152
+ sheet.set_column("O:O", 12)
153
+ sheet.set_column("P:P", 14)
154
+ sheet.set_column("Q:Q", 40)
155
+ sheet.set_column("R:T", 16)
156
+ sheet.set_column("U:Z", 14, decimal_format)
125
157
 
126
158
  next_col = excel_col_number(last_col) + 1
127
159
  sheet.set_column(next_col, next_col, 14, date_format)
@@ -131,6 +163,11 @@ class VatNumberXlsx(models.AbstractModel):
131
163
  sheet.set_column(next_col, next_col, 14)
132
164
  next_col += 1
133
165
  sheet.set_column(next_col, next_col, 30)
166
+ next_col += 1
167
+ sheet.set_column(next_col, next_col, 16)
168
+ next_col += 1
169
+ sheet.set_column(next_col, next_col, 16)
170
+
134
171
  if draft_export:
135
172
  next_col += 1
136
173
  sheet.write(5, next_col, "Impuesto (Solo borrador)")
@@ -149,30 +186,29 @@ class VatNumberXlsx(models.AbstractModel):
149
186
  country_code, identifier_type, vat_number = (
150
187
  line.partner_id and line.partner_id._parse_aeat_vat_info() or ("ES", "", "")
151
188
  )
152
- sheet.write("A" + str(row), self.format_boe_date(line.invoice_date))
153
- # sheet.write('B' + str(row), self.format_boe_date(line.invoice_date))
154
- sheet.write("C" + str(row), line.ref[:-20])
155
- sheet.write("D" + str(row), line.ref[-20:])
156
- sheet.write("E" + str(row), "") # Final number
157
- sheet.write("F" + str(row), identifier_type)
189
+ sheet.write("A" + str(row), str(line.vat_book_id.year))
190
+ sheet.write("B" + str(row), str(line.vat_book_id.period_type))
191
+ sheet.write("I" + str(row), self.format_boe_date(line.invoice_date))
192
+ # sheet.write('J' + str(row), self.format_boe_date(line.invoice_date))
193
+ sheet.write("K" + str(row), line.ref[:-20])
194
+ sheet.write("L" + str(row), line.ref[-20:])
195
+ sheet.write("M" + str(row), "") # Final number
196
+ sheet.write("N" + str(row), identifier_type)
158
197
  if country_code != "ES":
159
- sheet.write("G" + str(row), country_code)
160
- sheet.write("H" + str(row), vat_number)
198
+ sheet.write("O" + str(row), country_code)
199
+ sheet.write("P" + str(row), vat_number)
161
200
  if not vat_number and (
162
201
  line.partner_id.aeat_anonymous_cash_customer or not line.partner_id
163
202
  ):
164
- sheet.write("I" + str(row), "Venta anónima")
203
+ sheet.write("Q" + str(row), "Venta anónima")
165
204
  else:
166
- sheet.write("I" + str(row), (line.partner_id.name or "")[:40])
167
- # TODO: Substitute Invoice
168
- # sheet.write('J' + str(row),
169
- # line.invoice_id.refund_invoice_id.number or '')
170
- sheet.write("K" + str(row), "") # Operation Key
205
+ sheet.write("Q" + str(row), (line.partner_id.name or "")[:40])
206
+ sheet.write("R" + str(row), "") # Operation Key
171
207
  if with_total:
172
- sheet.write("L" + str(row), line.total_amount)
173
- sheet.write("M" + str(row), tax_line.base_amount)
174
- sheet.write("N" + str(row), tax_line.tax_id.amount)
175
- sheet.write("O" + str(row), tax_line.tax_amount)
208
+ sheet.write("U" + str(row), line.total_amount)
209
+ sheet.write("V" + str(row), tax_line.base_amount)
210
+ sheet.write("W" + str(row), tax_line.tax_id.amount)
211
+ sheet.write("X" + str(row), tax_line.tax_amount)
176
212
  if tax_line.special_tax_id:
177
213
  map_vals = line.vat_book_id.get_special_taxes_dic()[
178
214
  tax_line.special_tax_id.id
@@ -216,41 +252,58 @@ class VatNumberXlsx(models.AbstractModel):
216
252
  sheet.write("A3", f"NIF: {book.company_vat}")
217
253
  sheet.write("A4:D4", f"NOMBRE/RAZÓN SOCIAL: {book.company_id.name}")
218
254
 
255
+ sheet.merge_range("A6:B6", "Autoliquidación", header_format)
256
+ sheet.merge_range("C6:E6", "Actividad", header_format)
219
257
  sheet.merge_range(
220
- "C6:D6", "Identificación Factura del Expedidor", header_format
258
+ "K6:L6", "Identificación Factura del Expedidor", header_format
221
259
  )
222
- sheet.merge_range("G6:I6", "NIF Expedidor", header_format)
260
+ sheet.merge_range("P6:R6", "NIF Expedidor", header_format)
261
+ sheet.merge_range("X6:Y6", "Periodo Deducción", header_format)
223
262
 
224
- sheet.merge_range("A6:A7", "Fecha Expedición", header_format)
225
- sheet.merge_range("B6:B7", "Fecha Operación", header_format)
226
- sheet.write("C7", "(Serie-Número)", subheader_format)
227
- sheet.write("D7", "Número-Final", subheader_format)
228
- sheet.merge_range("E6:E7", "Número Recepción", header_format)
229
- sheet.merge_range("F6:F7", "Número Recepción Final", header_format)
230
- sheet.write("G7", "Tipo", subheader_format)
231
- sheet.write("H7", "Código País", subheader_format)
232
- sheet.write("I7", "Identificación", subheader_format)
233
- sheet.merge_range("J6:J7", "Nombre Expedidor", header_format)
234
- sheet.merge_range("K6:K7", "Factura Sustitutiva", header_format)
235
- sheet.merge_range("L6:L7", "Clave de Operación", header_format)
236
- sheet.merge_range("M6:M7", "Total Factura", header_format)
237
- sheet.merge_range("N6:N7", "Base Imponible", header_format)
238
- sheet.merge_range("O6:O7", "Tipo de IVA", header_format)
239
- sheet.merge_range("P6:P7", "Cuota IVA Soportado", header_format)
240
- sheet.merge_range("Q6:Q7", "Cuota Deducible", header_format)
241
- last_col = "Q"
263
+ sheet.write("A7", "Ejercicio", subheader_format)
264
+ sheet.write("B7", "Periodo", subheader_format)
265
+ sheet.write("C7", "Código", subheader_format)
266
+ sheet.write("D7", "Tipo", subheader_format)
267
+ sheet.write("E7", "Grupo o Epígrafe del IAE", subheader_format)
268
+ sheet.merge_range("F6:F7", "Tipo de factura", header_format)
269
+ sheet.merge_range("G6:G7", "Concepto de Gasto", header_format)
270
+ sheet.merge_range("H6:H7", "Gasto Deducible", header_format)
271
+ sheet.merge_range("I6:I7", "Fecha Expedición", header_format)
272
+ sheet.merge_range("J6:J7", "Fecha Operación", header_format)
273
+ sheet.write("K7", "(Serie-Número)", subheader_format)
274
+ sheet.write("L7", "Número-Final", subheader_format)
275
+ sheet.merge_range("M6:M7", "Fecha Recepción", header_format)
276
+ sheet.merge_range("N6:N7", "Número Recepción", header_format)
277
+ sheet.merge_range("O6:O7", "Número Recepción Final", header_format)
278
+ sheet.write("P7", "Tipo", subheader_format)
279
+ sheet.write("Q7", "Código País", subheader_format)
280
+ sheet.write("R7", "Identificación", subheader_format)
281
+ sheet.merge_range("S6:S7", "Nombre Expedidor", header_format)
282
+ sheet.merge_range("T6:T7", "Clave de Operación", header_format)
283
+ sheet.merge_range("U6:U7", "Bien de Inversión", header_format)
284
+ sheet.merge_range("V6:V7", "Inversión del Sujeto Pasivo", header_format)
285
+ sheet.merge_range("W6:W7", "Deducible en Periodo Posterior", header_format)
286
+ sheet.write("X7", "Ejercicio", header_format)
287
+ sheet.write("Y7", "Periodo", header_format)
288
+ sheet.merge_range("Z6:Z7", "Total Factura", header_format)
289
+ sheet.merge_range("AA6:AA7", "Base Imponible", header_format)
290
+ sheet.merge_range("AB6:AB7", "Tipo de IVA", header_format)
291
+ sheet.merge_range("AC6:AC7", "Cuota IVA Soportado", header_format)
292
+ sheet.merge_range("AD6:AD7", "Cuota Deducible", header_format)
293
+ last_col = "AD"
242
294
  for line in self._get_vat_book_map_lines("received"):
243
- sheet.merge_range(
244
- f"{line.fee_type_xlsx_column}6:{line.fee_type_xlsx_column}7",
245
- f"Tipo de {line.name}",
246
- header_format,
247
- )
248
- sheet.merge_range(
249
- f"{line.fee_amount_xlsx_column}6:{line.fee_amount_xlsx_column}7",
250
- f"Cuota {line.name}",
251
- header_format,
252
- )
253
- last_col = line.fee_amount_xlsx_column
295
+ if line.special_tax_group != "irpf":
296
+ sheet.merge_range(
297
+ f"{line.fee_type_xlsx_column}6:{line.fee_type_xlsx_column}7",
298
+ f"Tipo de {line.name}",
299
+ header_format,
300
+ )
301
+ sheet.merge_range(
302
+ f"{line.fee_amount_xlsx_column}6:{line.fee_amount_xlsx_column}7",
303
+ f"Cuota {line.name}",
304
+ header_format,
305
+ )
306
+ last_col = line.fee_amount_xlsx_column
254
307
  next_col = excel_col_number(last_col) + 1
255
308
  # Las filas empiezan por 0, por eso se resta 1
256
309
  sheet.merge_range(
@@ -268,16 +321,44 @@ class VatNumberXlsx(models.AbstractModel):
268
321
  sheet.write(6, next_col, "Medio Utilizado", subheader_format)
269
322
  next_col += 1
270
323
  sheet.write(6, next_col, "Identificación Medio Utilizado", subheader_format)
324
+ next_col += 1
325
+ sheet.merge_range(
326
+ 5,
327
+ next_col,
328
+ 6,
329
+ next_col,
330
+ "Tipo de Retención del IRPF",
331
+ header_format,
332
+ )
333
+ next_col += 1
334
+ sheet.merge_range(
335
+ 5,
336
+ next_col,
337
+ 6,
338
+ next_col,
339
+ "Importe Retenido del IRPF",
340
+ header_format,
341
+ )
342
+ next_col += 1
343
+ sheet.merge_range(
344
+ 5,
345
+ next_col,
346
+ 6,
347
+ next_col,
348
+ "Registro Acuerdo Facturación",
349
+ header_format,
350
+ )
271
351
 
272
- sheet.set_column("A:B", 16, date_format)
273
- sheet.set_column("C:F", 17)
274
- sheet.set_column("G:G", 8)
275
- sheet.set_column("H:H", 12)
276
- sheet.set_column("I:I", 14)
277
- sheet.set_column("J:J", 40)
278
- sheet.set_column("K:K", 16)
279
- sheet.set_column("L:L", 14)
280
- sheet.set_column("M:S", 14, decimal_format)
352
+ sheet.set_column("A:G", 14)
353
+ sheet.set_column("H:H", 16, decimal_format)
354
+ sheet.set_column("I:J", 16, date_format)
355
+ sheet.set_column("K:O", 17)
356
+ sheet.set_column("P:P", 8)
357
+ sheet.set_column("Q:Q", 12)
358
+ sheet.set_column("R:R", 14)
359
+ sheet.set_column("S:S", 40)
360
+ sheet.set_column("T:Y", 16)
361
+ sheet.set_column("Z:AF", 14, decimal_format)
281
362
  next_col = excel_col_number(last_col) + 1
282
363
  sheet.set_column(next_col, next_col, 14, date_format)
283
364
  next_col += 1
@@ -286,6 +367,13 @@ class VatNumberXlsx(models.AbstractModel):
286
367
  sheet.set_column(next_col, next_col, 14)
287
368
  next_col += 1
288
369
  sheet.set_column(next_col, next_col, 30)
370
+ next_col += 1
371
+ sheet.set_column(next_col, next_col, 14, decimal_format)
372
+ next_col += 1
373
+ sheet.set_column(next_col, next_col, 14, decimal_format)
374
+ next_col += 1
375
+ sheet.set_column(next_col, next_col, 16)
376
+
289
377
  if draft_export:
290
378
  next_col += 1
291
379
  sheet.write(5, next_col, "Impuesto (Solo borrador)")
@@ -305,29 +393,30 @@ class VatNumberXlsx(models.AbstractModel):
305
393
  country_code, identifier_type, vat_number = (
306
394
  line.partner_id and line.partner_id._parse_aeat_vat_info() or ("ES", "", "")
307
395
  )
308
- sheet.write("A" + str(row), self.format_boe_date(line.invoice_date))
396
+ sheet.write("A" + str(row), str(line.vat_book_id.year))
397
+ sheet.write("B" + str(row), str(line.vat_book_id.period_type))
398
+ sheet.write("I" + str(row), self.format_boe_date(line.invoice_date))
309
399
  if date_invoice and date_invoice != line.invoice_date:
310
- sheet.write("B" + str(row), self.format_boe_date(date_invoice))
311
- sheet.write("C" + str(row), (line.external_ref or "")[:40])
312
- sheet.write("D" + str(row), "")
313
- sheet.write("E" + str(row), line.ref[:20])
314
- sheet.write("F" + str(row), "")
315
- sheet.write("G" + str(row), identifier_type)
400
+ sheet.write("J" + str(row), self.format_boe_date(date_invoice))
401
+ sheet.write("K" + str(row), (line.external_ref or "")[:40])
402
+ sheet.write("L" + str(row), "")
403
+ sheet.write("N" + str(row), line.ref[:20])
404
+ sheet.write("O" + str(row), "")
405
+ sheet.write("P" + str(row), identifier_type)
316
406
  if country_code != "ES":
317
- sheet.write("H" + str(row), country_code)
318
- sheet.write("I" + str(row), vat_number)
319
- sheet.write("J" + str(row), (line.partner_id.name or "")[:40])
320
- # TODO: Substitute Invoice
321
- # sheet.write('K' + str(row),
322
- # line.invoice_id.refund_invoice_id.number or '')
323
- sheet.write("L" + str(row), "") # Operation Key
407
+ sheet.write("Q" + str(row), country_code)
408
+ sheet.write("R" + str(row), vat_number)
409
+ sheet.write("S" + str(row), (line.partner_id.name or "")[:40])
410
+ sheet.write("T" + str(row), "") # Operation Key
411
+ sheet.write("X" + str(row), line.move_id.date.year)
412
+ sheet.write("Y" + str(row), line._get_settlement_period())
324
413
  if with_total:
325
- sheet.write("M" + str(row), line.total_amount)
326
- sheet.write("N" + str(row), tax_line.base_amount)
327
- sheet.write("O" + str(row), tax_line.tax_id.amount)
328
- sheet.write("P" + str(row), tax_line.tax_amount)
414
+ sheet.write("Z" + str(row), line.total_amount)
415
+ sheet.write("AA" + str(row), tax_line.base_amount)
416
+ sheet.write("AB" + str(row), tax_line.tax_id.amount)
417
+ sheet.write("AC" + str(row), tax_line.tax_amount)
329
418
  if tax_line.tax_id not in self._get_undeductible_taxes(line.vat_book_id):
330
- sheet.write("Q" + str(row), tax_line.deductible_amount)
419
+ sheet.write("AD" + str(row), tax_line.deductible_amount)
331
420
  if tax_line.special_tax_id:
332
421
  map_vals = line.vat_book_id.get_special_taxes_dic()[
333
422
  tax_line.special_tax_id.id
@@ -366,18 +366,18 @@ ul.auto-toc {
366
366
  <a class="reference external image-reference" href="https://odoo-community.org/get-involved?utm_source=readme">
367
367
  <img alt="Odoo Community Association" src="https://odoo-community.org/readme-banner-image" />
368
368
  </a>
369
- <div class="section" id="libro-de-iva">
370
- <h1>Libro de IVA</h1>
369
+ <div class="section" id="libros-registro-del-iva-y-del-irpf">
370
+ <h1>Libros registro del IVA y del IRPF</h1>
371
371
  <!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
372
372
  !! This file is generated by oca-gen-addon-readme !!
373
373
  !! changes will be overwritten. !!
374
374
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375
- !! source digest: sha256:8b15c846d57c2b4978cc7506c4ada6400d13d1072d1dec4d22590b7e7e9a90ed
375
+ !! source digest: sha256:df2894f85a707364acdb7106ab99c3505929e5e14752c235796df60c96f9a31d
376
376
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377
377
  <p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/l10n-spain/tree/18.0/l10n_es_vat_book"><img alt="OCA/l10n-spain" src="https://img.shields.io/badge/github-OCA%2Fl10n--spain-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/l10n-spain-18-0/l10n-spain-18-0-l10n_es_vat_book"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/l10n-spain&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378
- <p>Módulo que calcula el libro de IVA español.</p>
379
- <p>Esto módulo introduce el menú “Libro de IVA” en Contabilidad -&gt; Informe
380
- -&gt; Declaraciones AEAT -&gt; Libro de IVA.</p>
378
+ <p>Módulo que calcula los libros de IVA e IRPF español.</p>
379
+ <p>Esto módulo introduce el menú “Libros de IVA y del IRPF” en Contabilidad
380
+ -&gt; Informe -&gt; Declaraciones AEAT.</p>
381
381
  <p>Es posible visualizar e imprimir por separado:</p>
382
382
  <ul class="simple">
383
383
  <li>Libro Registro de Facturas Emitidas</li>
@@ -446,6 +446,9 @@ no tener NIF informado siguiendo lo especificado en el formato BOE.</p>
446
446
  <li>Criterio de caja</li>
447
447
  <li>Regímenes especiales de seguros, de agencias de viaje o de bienes
448
448
  usados.</li>
449
+ <li>Clave de operación.</li>
450
+ <li>Deducible en periodo posterior.</li>
451
+ <li>Actividad</li>
449
452
  </ul>
450
453
  </div>
451
454
  <div class="section" id="bug-tracker">
@@ -476,6 +479,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
476
479
  <li>Pedro M. Baeza</li>
477
480
  <li>Carlos Dauden</li>
478
481
  <li>Ernesto Tejeda</li>
482
+ <li>Eduardo Ezerouali</li>
479
483
  </ul>
480
484
  </li>
481
485
  <li>Omar Castiñeira &lt;<a class="reference external" href="mailto:omar&#64;comunitea.com">omar&#64;comunitea.com</a>&gt;</li>
@@ -24,6 +24,10 @@ class TestL10nEsAeatVatBookBase(TestL10nEsAeatModBase):
24
24
  "P_IVA21_SC": (230, 48.3),
25
25
  "P_IVA0_ND": (100, 21),
26
26
  "P_IVA21_IC_BC": (200, 42),
27
+ "P_REQ05": (270, 1.35),
28
+ "P_REQ014": (280, 3.92),
29
+ "P_REQ52": (290, 15.08),
30
+ "P_IRPF19": (1024, 194.56),
27
31
  }
28
32
 
29
33
 
@@ -75,19 +79,40 @@ class TestL10nEsAeatVatBook(TestL10nEsAeatVatBookBase):
75
79
  self.assertEqual(line.base_amount, 0.0)
76
80
  self.assertEqual(line.tax_amount, 0.0)
77
81
  # Check tax summary for received invoices
78
- self.assertEqual(len(vat_book.received_tax_summary_ids), 3)
82
+ self.assertEqual(len(vat_book.received_tax_summary_ids), 7)
83
+ rec_summaries = sorted(
84
+ vat_book.received_tax_summary_ids,
85
+ key=lambda line: line.tax_amount,
86
+ reverse=True,
87
+ )
79
88
  # P_IVA21_SC - 21% IVA soportado (servicios corrientes)
80
- line = vat_book.received_tax_summary_ids[0]
89
+ line = rec_summaries[0]
81
90
  self.assertAlmostEqual(line.base_amount, 230)
82
91
  self.assertAlmostEqual(line.tax_amount, 48.3)
83
92
  # P_IVA21_IC_BC - IVA 21% Adquisición Intracomunitaria. Bienes corrientes
84
- line = vat_book.received_tax_summary_ids[1]
93
+ line = rec_summaries[1]
85
94
  self.assertAlmostEqual(line.base_amount, 200)
86
95
  self.assertAlmostEqual(line.tax_amount, 42)
87
96
  # P_IVA0_ND - 21% IVA Soportado no deducible
88
- line = vat_book.received_tax_summary_ids[2]
97
+ line = rec_summaries[2]
89
98
  self.assertAlmostEqual(line.base_amount, 100)
90
99
  self.assertAlmostEqual(line.tax_amount, 21)
100
+ # P_REQ52 - 5.2% Recargo de equivalencia sobre operaciones sujetas a IVA
101
+ line = rec_summaries[3]
102
+ self.assertAlmostEqual(line.base_amount, 290)
103
+ self.assertAlmostEqual(line.tax_amount, 15.08)
104
+ # P_REQ014 - 1.4% Recargo de equivalencia sobre operaciones sujetas a IVA
105
+ line = rec_summaries[4]
106
+ self.assertAlmostEqual(line.base_amount, 280)
107
+ self.assertAlmostEqual(line.tax_amount, 3.92)
108
+ # P_REQ05 - 0.5% Recargo de equivalencia sobre operaciones sujetas a IVA
109
+ line = rec_summaries[5]
110
+ self.assertAlmostEqual(line.base_amount, 270)
111
+ self.assertAlmostEqual(line.tax_amount, 1.35)
112
+ # P_IRPF19 - 19% Impuesto sobre la resta fisica
113
+ line = rec_summaries[6]
114
+ self.assertAlmostEqual(line.base_amount, 1024)
115
+ self.assertAlmostEqual(line.tax_amount, -194.56)
91
116
  # Let's dig into this tax detail for checking the deductible amount
92
117
  tax_line = vat_book.received_line_ids.tax_line_ids.filtered(
93
118
  lambda x: "account_tax_template_p_iva0_nd" in x.tax_id.get_external_id()
@@ -93,6 +93,9 @@
93
93
  </page>
94
94
  </notebook>
95
95
  </xpath>
96
+ <field name="period_type" position="after">
97
+ <field name="vat_settlement_period" />
98
+ </field>
96
99
  </field>
97
100
  </record>
98
101
  <record id="l10n_es_vat_book_action" model="ir.actions.act_window">
@@ -121,7 +124,7 @@
121
124
  id="menu_vat_book_report"
122
125
  parent="l10n_es_aeat.menu_l10n_es_aeat_submenu"
123
126
  action="l10n_es_vat_book_action"
124
- name="Libro de IVA"
127
+ name="Libros del IVA y del IRPF"
125
128
  />
126
129
  <!-- sequence="340" -->
127
130
  </odoo>
@@ -1,11 +1,11 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: odoo-addon-l10n_es_vat_book
3
- Version: 18.0.2.0.1.3
3
+ Version: 18.0.2.1.0
4
4
  Requires-Python: >=3.10
5
5
  Requires-Dist: odoo-addon-l10n_es_aeat==18.0.*
6
6
  Requires-Dist: odoo-addon-report_xlsx==18.0.*
7
7
  Requires-Dist: odoo==18.0.*
8
- Summary: Libro de IVA
8
+ Summary: Libros registro del IVA y del IRPF
9
9
  Home-page: https://github.com/OCA/l10n-spain
10
10
  License: AGPL-3
11
11
  Author: PRAXYA, ForgeFlow, Tecnativa, Odoo Community Association (OCA)
@@ -20,16 +20,16 @@ Description-Content-Type: text/x-rst
20
20
  :target: https://odoo-community.org/get-involved?utm_source=readme
21
21
  :alt: Odoo Community Association
22
22
 
23
- ============
24
- Libro de IVA
25
- ============
23
+ ==================================
24
+ Libros registro del IVA y del IRPF
25
+ ==================================
26
26
 
27
27
  ..
28
28
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
29
29
  !! This file is generated by oca-gen-addon-readme !!
30
30
  !! changes will be overwritten. !!
31
31
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
32
- !! source digest: sha256:8b15c846d57c2b4978cc7506c4ada6400d13d1072d1dec4d22590b7e7e9a90ed
32
+ !! source digest: sha256:df2894f85a707364acdb7106ab99c3505929e5e14752c235796df60c96f9a31d
33
33
  !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
34
34
 
35
35
  .. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
@@ -50,10 +50,10 @@ Libro de IVA
50
50
 
51
51
  |badge1| |badge2| |badge3| |badge4| |badge5|
52
52
 
53
- Módulo que calcula el libro de IVA español.
53
+ Módulo que calcula los libros de IVA e IRPF español.
54
54
 
55
- Esto módulo introduce el menú "Libro de IVA" en Contabilidad -> Informe
56
- -> Declaraciones AEAT -> Libro de IVA.
55
+ Esto módulo introduce el menú "Libros de IVA y del IRPF" en Contabilidad
56
+ -> Informe -> Declaraciones AEAT.
57
57
 
58
58
  Es posible visualizar e imprimir por separado:
59
59
 
@@ -117,6 +117,9 @@ Funcionalidades del Libro Registro de IVA no incluídas por el momento:
117
117
  - Criterio de caja
118
118
  - Regímenes especiales de seguros, de agencias de viaje o de bienes
119
119
  usados.
120
+ - Clave de operación.
121
+ - Deducible en periodo posterior.
122
+ - Actividad
120
123
 
121
124
  Bug Tracker
122
125
  ===========
@@ -149,6 +152,7 @@ Contributors
149
152
  - Pedro M. Baeza
150
153
  - Carlos Dauden
151
154
  - Ernesto Tejeda
155
+ - Eduardo Ezerouali
152
156
 
153
157
  - Omar Castiñeira <omar@comunitea.com>
154
158
  - Fernando La Chica <fernandolachica@gmail.com>
@@ -1,9 +1,9 @@
1
- odoo/addons/l10n_es_vat_book/README.rst,sha256=_pNhxuMDvOvSFmrmSkA7tzgCqnCUbl5jqgPw7-5UpzA,5129
1
+ odoo/addons/l10n_es_vat_book/README.rst,sha256=3HcnUQNyHKsECsA93U76md99eWYVS8nNHZUDPg7iipY,5291
2
2
  odoo/addons/l10n_es_vat_book/__init__.py,sha256=RYGen4VvN9c8GXvMfZMuO7ERiyRCUJfuAbgo0aC3DEU,42
3
- odoo/addons/l10n_es_vat_book/__manifest__.py,sha256=jNAVEntP5SE2GC9Y_GdgNbCk08YZq7N7o-oCI7A_bXo,1384
4
- odoo/addons/l10n_es_vat_book/data/aeat.vat.book.map.line.csv,sha256=1YFxsfnbFpFwbm5fssFUoD8VtImx2kopNrt0TkrW_QI,1918
3
+ odoo/addons/l10n_es_vat_book/__manifest__.py,sha256=bgGkFT6wXI3FlEWsBrIB9_gFOWdKcZ4NCFoWaTqjKl8,1453
4
+ odoo/addons/l10n_es_vat_book/data/aeat.vat.book.map.line.csv,sha256=x1NIbPjRy03G_uKWY-K-aNRpBRiSG-DDWXzk8xO7RjM,2635
5
5
  odoo/addons/l10n_es_vat_book/data/l10n.es.aeat.map.tax.line.account.csv,sha256=TrL5kRO3FRIuUv2X2yoU3Tb6hRIKcfi3IeiHkILfp6Y,68
6
- odoo/addons/l10n_es_vat_book/data/l10n.es.aeat.map.tax.line.tax.csv,sha256=7nxLQ3FSBIjjfMhj5QSD8JScYGm9TcHhVA3tWeOpAjE,4559
6
+ odoo/addons/l10n_es_vat_book/data/l10n.es.aeat.map.tax.line.tax.csv,sha256=DxaveCuJxj6xCmBF_nMM_aaF2GXjQu86mjLiRVnIdC4,6496
7
7
  odoo/addons/l10n_es_vat_book/i18n/bg.po,sha256=_PcqDYeTjLYLeeByCQ0d3eX4ROVLKCch6cKV2feF8lI,35105
8
8
  odoo/addons/l10n_es_vat_book/i18n/ca.po,sha256=C30ymoeIY8bdGGnrAiwv1WCbx2BrE9lUHv7Rk5khz08,40725
9
9
  odoo/addons/l10n_es_vat_book/i18n/cs.po,sha256=EzcMApIIyo38VceiIEABGd_0DTLizggA8msTCw0vqzM,35023
@@ -15,7 +15,7 @@ odoo/addons/l10n_es_vat_book/i18n/eu.po,sha256=z7TBhNOfrgtYbTM-rSNIjLJ0aqcx6fRb_
15
15
  odoo/addons/l10n_es_vat_book/i18n/fr.po,sha256=RNuHZGOShQvolOqOXt_Bp69KzMucn2uyvS5LMDQ5oSU,35009
16
16
  odoo/addons/l10n_es_vat_book/i18n/gl.po,sha256=M4B_nRCQz0U1lIaplScdEW8h4gzu9HJBwIx1y58i6tA,35072
17
17
  odoo/addons/l10n_es_vat_book/i18n/hr.po,sha256=u9NHt6PgMoTHelIvod9z8ESzGbEZFkoi1r1Puuztr80,35055
18
- odoo/addons/l10n_es_vat_book/i18n/l10n_es_vat_book.pot,sha256=8RY6CW9-fDajPSd2a3oVVPfAHGjB2aqR51J-7zQsZr4,34520
18
+ odoo/addons/l10n_es_vat_book/i18n/l10n_es_vat_book.pot,sha256=DiChpwOBHWxy2X4S-hexobgjUdfrr4Yz_NuMNNUVWZ8,35056
19
19
  odoo/addons/l10n_es_vat_book/i18n/nl.po,sha256=W5xQrFMY2mE8SeUsdD6ExyEUmo3K9U7va78D9CcsTps,35007
20
20
  odoo/addons/l10n_es_vat_book/i18n/pl.po,sha256=_q5P_a-1zcAM8piTHUgiYFcc7YrOqmZqzIUIVtk2s00,35163
21
21
  odoo/addons/l10n_es_vat_book/i18n/pt.po,sha256=7hdcHv1Fd-ms6aFzrq7JziRB1ZubmICfjFzNmfIaYWo,35020
@@ -28,36 +28,36 @@ odoo/addons/l10n_es_vat_book/i18n/vi.po,sha256=DyJLWyUWn2yK2lpAWtu_RqdmwpJgDVt8g
28
28
  odoo/addons/l10n_es_vat_book/migrations/18.0.2.0.0/post-migration.py,sha256=AXJRI3J9g9OR0nOskb4ufGX3AUT-wEv_xMV7URfcvmI,334
29
29
  odoo/addons/l10n_es_vat_book/models/__init__.py,sha256=V0ONDc9wKn8JF0Soh2NCORHEAQ7EcOn16SNkxjA50WU,226
30
30
  odoo/addons/l10n_es_vat_book/models/aeat_vat_book_map_line.py,sha256=CfuXLhscmFWhzgbK7bTcFGgu4klJH_Hr3r3LouphLKI,2088
31
- odoo/addons/l10n_es_vat_book/models/l10n_es_vat_book.py,sha256=yJVpwUQdZLxlwhyi6lD8y9ZetC4c0RcukiGyC_N7biY,22224
32
- odoo/addons/l10n_es_vat_book/models/l10n_es_vat_book_line.py,sha256=9LqiNYUGomYBVIyvdT1qTnNwHKTM3df6jJxWvnoIsLk,2146
31
+ odoo/addons/l10n_es_vat_book/models/l10n_es_vat_book.py,sha256=6mr1ko7OBg3cnJ7Xqt0GXmnHxMtUHV9o991p4JK11Kk,22129
32
+ odoo/addons/l10n_es_vat_book/models/l10n_es_vat_book_line.py,sha256=CJp7F9IBv-Yge0FJR5oT7G4mAb6zDYX43Tb81TMhLXQ,2465
33
33
  odoo/addons/l10n_es_vat_book/models/l10n_es_vat_book_line_tax.py,sha256=Uoid5DEQc07Bz5r7JqfKbkd91LGqR_1tsfq1VXkaSQw,2440
34
34
  odoo/addons/l10n_es_vat_book/models/l10n_es_vat_book_summary.py,sha256=7NKIt1v_hx-5PXs4rbpdngX-4cIPpbRtht2LRQ26HV8,1202
35
35
  odoo/addons/l10n_es_vat_book/models/l10n_es_vat_book_tax_summary.py,sha256=No6PJ34A-V16ij_1h5zqsGI6wpg1i-g57ZQX_R8YyY8,1260
36
36
  odoo/addons/l10n_es_vat_book/readme/CONFIGURE.md,sha256=prDqeAmmUOBhAn-LV4kghJ9zcBAEG1Sp9EBun61KaZ0,351
37
- odoo/addons/l10n_es_vat_book/readme/CONTRIBUTORS.md,sha256=N7iqkzX9zxihBoewdVR7N6rxiC6-9m6perNgLspgiFM,484
38
- odoo/addons/l10n_es_vat_book/readme/DESCRIPTION.md,sha256=p1OTAkih5MFeImcnc-EK3kVAKJpfq49yb3nHusS9w28,474
37
+ odoo/addons/l10n_es_vat_book/readme/CONTRIBUTORS.md,sha256=GLZ6NrWIhvtRKYn-rNXZPRVzGoivL3RJSDFhM9qReqc,506
38
+ odoo/addons/l10n_es_vat_book/readme/DESCRIPTION.md,sha256=vA9lxX-KEvTtCSbY2xdC-km4yKpy0K0BJsRVcvsHYC8,478
39
39
  odoo/addons/l10n_es_vat_book/readme/INSTALL.md,sha256=szULZOUnQsfO-mRKmnF_PsGmARm1m9zeuh9ma5FswbI,469
40
- odoo/addons/l10n_es_vat_book/readme/ROADMAP.md,sha256=6jBDDFeZ1iDh9yAb6p8RUWcfrObxSxCwxpzpCteeilg,171
40
+ odoo/addons/l10n_es_vat_book/readme/ROADMAP.md,sha256=0fgBRgoMJ3sELkXeeSY_A6BZv1dIWnJbopbzTFnpSp0,240
41
41
  odoo/addons/l10n_es_vat_book/readme/USAGE.md,sha256=WTI42NoWwgTi0lmaj9icm_TFvGcnks_fit7kJwwEyos,227
42
42
  odoo/addons/l10n_es_vat_book/report/__init__.py,sha256=QS0o-fQFNABxF_-bBmduhokP3PWyj7GhHU2mEeGdKXI,28
43
43
  odoo/addons/l10n_es_vat_book/report/common_templates.xml,sha256=Hu_8s9pR6Ll4ui-0rCHG68gB2pzXpCXKZnh35xSWGbI,10046
44
44
  odoo/addons/l10n_es_vat_book/report/report_views.xml,sha256=CiXGZY8KFwZFqAxjWMYWXIR0iUSBxaS67eCl9lMxAQk,2277
45
45
  odoo/addons/l10n_es_vat_book/report/vat_book_invoices_issued.xml,sha256=9RnQeHVKFBXG2hQH-Vf41oHs1yrz2sknaj4bDhKrs7Y,4127
46
46
  odoo/addons/l10n_es_vat_book/report/vat_book_invoices_received.xml,sha256=l43OPxfR2IlVACmyRWgEYp7x62Q0k9bQG7jdEFwjwIs,4121
47
- odoo/addons/l10n_es_vat_book/report/vat_book_xlsx.py,sha256=bAQ1DMw4S_teDrPDzXtIjTTuAcmrsG87j2lbUN97cNo,16381
47
+ odoo/addons/l10n_es_vat_book/report/vat_book_xlsx.py,sha256=Y_AnIiLB9lUgByDEV1QV_jR74ZOeZD4lX2rYN2wVsV4,20013
48
48
  odoo/addons/l10n_es_vat_book/report/vat_book_xlsx.xml,sha256=sZd6sU-mnZUN-odM8R5MHtt6XfuXkVxPEkyP8XjJMf8,576
49
49
  odoo/addons/l10n_es_vat_book/security/ir.model.access.csv,sha256=D-VRSm4gZ7A0LOlIH9JL-EXkH7EzbubObuFL634GuUs,871
50
50
  odoo/addons/l10n_es_vat_book/security/ir_rule.xml,sha256=4HkdO_WPIAK6hXcVUIFTLmzl0af-tVplhO-o2Xsic1M,521
51
51
  odoo/addons/l10n_es_vat_book/static/description/icon.png,sha256=6xBPJauaFOF0KDHfHgQopSc28kKvxMaeoQFQWZtfZDo,9455
52
- odoo/addons/l10n_es_vat_book/static/description/index.html,sha256=I-ESrXrxNB9lILDYvFoIf1GSyctEPSfBz7D5cSu_ek8,16291
52
+ odoo/addons/l10n_es_vat_book/static/description/index.html,sha256=cSHjDCLZKLCmhZE6CScsJt7UdT6HsHA_gaR1-49JoXE,16454
53
53
  odoo/addons/l10n_es_vat_book/tests/__init__.py,sha256=4dynCSzE14Nz6hAqV9vEmx8lEt3Byn-gqNKA0-wj7uc,41
54
- odoo/addons/l10n_es_vat_book/tests/test_l10n_es_aeat_vat_book.py,sha256=bStaRiDb8rBVUkVfN5Nngpky93SFGruE9syOd7RwuQU,5174
54
+ odoo/addons/l10n_es_vat_book/tests/test_l10n_es_aeat_vat_book.py,sha256=4DNuQKedqFnm4To5ekL5O-iCZaNtJwsvj7mfD7Q4xUE,6274
55
55
  odoo/addons/l10n_es_vat_book/views/aeat_vat_book_map_view.xml,sha256=5JshRk9EUj7748Wgq0GFLEFKFPzoYZ8cOpr42TPQ4eU,1281
56
- odoo/addons/l10n_es_vat_book/views/l10n_es_vat_book.xml,sha256=c2GC5BQWnBzRJwOIFDukKHNycobKobgz_Ff1Y4IrtP0,5586
56
+ odoo/addons/l10n_es_vat_book/views/l10n_es_vat_book.xml,sha256=Zu3WLsVAQfhTBkVFJfBU5IV73q64_YHcu--Jg2sbSTU,5731
57
57
  odoo/addons/l10n_es_vat_book/views/l10n_es_vat_book_line.xml,sha256=Pu42fg7xC8CnwDxnmUhMrC8CQt71kS1Wamue9wKKApw,4575
58
58
  odoo/addons/l10n_es_vat_book/views/l10n_es_vat_book_summary.xml,sha256=eofP_7uLFzOxxXZKTIIKckhEJnOHtbZcLU1vtL9OJzE,1333
59
59
  odoo/addons/l10n_es_vat_book/views/l10n_es_vat_book_tax_summary.xml,sha256=pZ_xc9TA7kvln4ecgyQxPZaSfxSToCjylUUnMBTHrNE,2086
60
- odoo_addon_l10n_es_vat_book-18.0.2.0.1.3.dist-info/METADATA,sha256=xAM5V-NxRh2XjQ-LWbeNzsYcZFR7ddej61-9Yt-w5ZM,5772
61
- odoo_addon_l10n_es_vat_book-18.0.2.0.1.3.dist-info/WHEEL,sha256=ZhOvUsYhy81Dx67gN3TV0RchQWBIIzutDZaJODDg2Vo,81
62
- odoo_addon_l10n_es_vat_book-18.0.2.0.1.3.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
63
- odoo_addon_l10n_es_vat_book-18.0.2.0.1.3.dist-info/RECORD,,
60
+ odoo_addon_l10n_es_vat_book-18.0.2.1.0.dist-info/METADATA,sha256=W4oMoyQf8qtLsHWSSD6gXd91RILribpPJzoNaZBwerg,5954
61
+ odoo_addon_l10n_es_vat_book-18.0.2.1.0.dist-info/WHEEL,sha256=ZhOvUsYhy81Dx67gN3TV0RchQWBIIzutDZaJODDg2Vo,81
62
+ odoo_addon_l10n_es_vat_book-18.0.2.1.0.dist-info/top_level.txt,sha256=QE6RBQ0QX5f4eFuUcGgU5Kbq1A_qJcDs-e_vpr6pmfU,4
63
+ odoo_addon_l10n_es_vat_book-18.0.2.1.0.dist-info/RECORD,,