Skip to content

Commit

Permalink
[IMP] l10n_es_aeat_mod322: 2024-10 format
Browse files Browse the repository at this point in the history
  • Loading branch information
FrankC013 committed Feb 12, 2025
1 parent 39dd0c6 commit 7f86612
Show file tree
Hide file tree
Showing 12 changed files with 331 additions and 2 deletions.
4 changes: 4 additions & 0 deletions l10n_es_aeat_mod322/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ Contributors
~~~~~~~~~~~~

- Enric Tobella
- `NuoBiT <https://www.nuobit.com>`__:

* Frank Cespedes
* Eric Antones

Maintainers
~~~~~~~~~~~
Expand Down
4 changes: 4 additions & 0 deletions l10n_es_aeat_mod322/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
"data/2023/l10n.es.aeat.map.tax.line.csv",
"data/2023/aeat.model.export.config.csv",
"data/2023/aeat.model.export.config.line.csv",
"data/2024-10/l10n.es.aeat.map.tax.csv",
"data/2024-10/l10n.es.aeat.map.tax.line.csv",
"data/2024-10/aeat.model.export.config.csv",
"data/2024-10/aeat.model.export.config.line.csv",
],
"demo": [],
}
2 changes: 1 addition & 1 deletion l10n_es_aeat_mod322/data/2023/aeat.model.export.config.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
id,name,date_end,model_number,model_id:id,date_start,date_end,active
aeat_mod322_2023_main_export_config,Mod.322 2023-actualidad,,322,model_l10n_es_aeat_mod322_report,2023-01-01,,True
aeat_mod322_2023_main_export_config,Mod.322 2023,,322,model_l10n_es_aeat_mod322_report,2023-01-01,2024-08-31,True
aeat_mod322_2023_sub01_export_config,Exportación modelo 322 2023 - Régimen general/simplificado,,322,0,,,0
aeat_mod322_2023_sub02_export_config,Exportación modelo 322 2023 - Régimen general/simplificado - continuación,,322,0,,,0
aeat_mod322_2023_sub03_export_config,Exportación modelo 322 2023 - Información adicional + Resultado,,322,0,,,0
2 changes: 1 addition & 1 deletion l10n_es_aeat_mod322/data/2023/l10n.es.aeat.map.tax.csv
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
id,model,date_from,date_to
aeat_mod322_2023_map,322,2023-01-01,
aeat_mod322_2023_map,322,2023-01-01,2024-09-30
5 changes: 5 additions & 0 deletions l10n_es_aeat_mod322/data/2024-10/aeat.model.export.config.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
id,name,date_end,model_number,model_id:id,date_start,date_end,active
aeat_mod322_2024_10_main_export_config,Mod.322 2024-10-actualidad,,322,model_l10n_es_aeat_mod322_report,2024-10-01,,True
aeat_mod322_2024_10_sub01_export_config,Exportación modelo 322 2024-10 - Régimen general/simplificado,,322,0,,,0
aeat_mod322_2024_10_sub02_export_config,Exportación modelo 322 2024-10 - Régimen general/simplificado - continuación,,322,0,,,0
aeat_mod322_2024_10_sub03_export_config,Exportación modelo 322 2024-10 - Información adicional + Resultado,,322,0,,,0
201 changes: 201 additions & 0 deletions l10n_es_aeat_mod322/data/2024-10/aeat.model.export.config.line.csv

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions l10n_es_aeat_mod322/data/2024-10/l10n.es.aeat.map.tax.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
id,model,date_from,date_to
aeat_mod322_2024_10_map,322,2024-10-01
83 changes: 83 additions & 0 deletions l10n_es_aeat_mod322/data/2024-10/l10n.es.aeat.map.tax.line.csv

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions l10n_es_aeat_mod322/models/l10n_es_aeat_mod322_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,13 @@ def _compute_total_devengado(self):
lambda r: r.field_number
in [
161,
173,
3,
164,
6,
9,
152,
167,
11,
14,
155,
Expand All @@ -216,6 +218,7 @@ def _compute_total_devengado(self):
26,
158,
29,
170,
32,
35,
37,
Expand Down Expand Up @@ -287,6 +290,8 @@ def _get_move_line_domain(self, date_start, date_end, map_line):
161,
162,
164,
171,
173,
]:
domain.append(("partner_id", "in", self.vinculated_partner_ids.ids))
if map_line.field_number in [
Expand All @@ -310,6 +315,9 @@ def _get_move_line_domain(self, date_start, date_end, map_line):
153,
154,
155,
165,
166,
167,
]:
domain += [
"|",
Expand All @@ -333,6 +341,16 @@ def _get_tax_lines(self, date_start, date_end, map_line):
or self.period_type not in ("4T", "12")
):
return self.env["account.move.line"]
if self.year == 2025 and (
162 <= map_line.field_number <= 173
or map_line.field_number
in [
153,
154,
155,
]
):
return self.env["account.move.line"]
return super()._get_tax_lines(
date_start,
date_end,
Expand Down
4 changes: 4 additions & 0 deletions l10n_es_aeat_mod322/readme/CONTRIBUTORS.rst
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
- Enric Tobella
- `NuoBiT <https://www.nuobit.com>`__:

* Frank Cespedes
* Eric Antones
5 changes: 5 additions & 0 deletions l10n_es_aeat_mod322/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,11 @@ <h2><a class="toc-backref" href="#toc-entry-4">Authors</a></h2>
<h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<ul class="simple">
<li>Enric Tobella</li>
<li><a class="reference external" href="https://www.nuobit.com">NuoBiT</a>:<ul>
<li>Frank Cespedes</li>
<li>Eric Antones</li>
</ul>
</li>
</ul>
</div>
<div class="section" id="maintainers">
Expand Down
3 changes: 3 additions & 0 deletions l10n_es_aeat_mod322/tests/test_mod322.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,11 +555,13 @@ def test_model_322(self):
self.taxes_result.get(b, 0.0)
for b in (
"161",
"173",
"3",
"164",
"6",
"9",
"152",
"167",
"11",
"14",
"155",
Expand All @@ -570,6 +572,7 @@ def test_model_322(self):
"26",
"158",
"29",
"170",
"32",
"35",
"37",
Expand Down

0 comments on commit 7f86612

Please sign in to comment.