Skip to content

Commit

Permalink
Merge PR OCA#3757 into 16.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Oct 8, 2024
2 parents 47912fe + 74be83f commit 1a5e781
Show file tree
Hide file tree
Showing 19 changed files with 242 additions and 13 deletions.
1 change: 1 addition & 0 deletions l10n_es_aeat_mod303/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Known issues / Roadmap
Foral.
* Posibilidad de marcar en el resultado el ingreso/devolución en la cuenta
corriente tributaria.
* No se pueden rellenar las casillas [108] y [111] de rectificación de autoliquidación.
* No se puede rellenar la casilla [109]: Devoluciones acordadas por la Agencia
Tributaria como consecuencia de la tramitación de anteriores autoliquidaciones
correspondientes al ejercicio y período objeto de la autoliquidación.
Expand Down
4 changes: 4 additions & 0 deletions l10n_es_aeat_mod303/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
"data/2023/aeat.model.export.config.line.csv",
"data/2023/l10n.es.aeat.map.tax.csv",
"data/2023/l10n.es.aeat.map.tax.line.csv",
"data/2024-10/aeat.model.export.config.csv",
"data/2024-10/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/tax_code_map_mod303_data.xml",
"data/aeat_export_mod303_2018_data.xml",
"data/aeat_export_mod303_2021_data.xml",
Expand Down
2 changes: 1 addition & 1 deletion l10n_es_aeat_mod303/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_mod303_2023_main_export_config","Mod.303 2023-actualidad",,"303","model_l10n_es_aeat_mod303_report","2023-01-01",,True
"aeat_mod303_2023_main_export_config","Mod.303 2023-2024-08",,"303","model_l10n_es_aeat_mod303_report","2023-01-01","2024-08-31",True
"aeat_mod303_2023_sub01_export_config","Exportación modelo 303 2023 - Régimen general/simplificado",,"303",0,,,0
"aeat_mod303_2023_sub03_export_config","Exportación modelo 303 2023 - Información adicional + Resultado",,"303",0,,,0
"aeat_mod303_2023_subdid_export_config","Exportación modelo 303 2023 - Devolución",,"303",0,,,0
2 changes: 1 addition & 1 deletion l10n_es_aeat_mod303/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_mod303_2023_map,303,2023-01-01,
aeat_mod303_2023_map,303,2023-01-01,2024-09-30
4 changes: 4 additions & 0 deletions l10n_es_aeat_mod303/data/2024-10/aeat.model.export.config.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
"id","name","date_end","model_number","model_id:id","date_start","date_end","active"
"aeat_mod303_2024_10_main_export_config","Mod. 303 2024-09-actualidad",,"303","model_l10n_es_aeat_mod303_report","2024-09-01",,True
"aeat_mod303_2024_10_sub01_export_config","Exportación modelo 303 2024-10 - Régimen general/simplificado",,"303",0,,,0
"aeat_mod303_2024_10_sub03_export_config","Exportación modelo 303 2024-10 - Información adicional + Resultado",,"303",0,,,0
147 changes: 147 additions & 0 deletions l10n_es_aeat_mod303/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_mod303/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_mod303_2024_10_map,303,2024-10-01,
63 changes: 63 additions & 0 deletions l10n_es_aeat_mod303/data/2024-10/l10n.es.aeat.map.tax.line.csv

Large diffs are not rendered by default.

Binary file not shown.
Binary file removed l10n_es_aeat_mod303/docs/DR303e15v34.xlsx
Binary file not shown.
Binary file removed l10n_es_aeat_mod303/docs/DR303e17v20_04.xlsx
Binary file not shown.
Binary file removed l10n_es_aeat_mod303/docs/DR303e18v10_00.xlsx
Binary file not shown.
Binary file removed l10n_es_aeat_mod303/docs/DR303e18v10_40.xlsx
Binary file not shown.
Binary file removed l10n_es_aeat_mod303/docs/DR303e22.xlsx
Binary file not shown.
Binary file added l10n_es_aeat_mod303/docs/DR303e24v200.xlsx
Binary file not shown.
15 changes: 11 additions & 4 deletions l10n_es_aeat_mod303/models/mod303.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,15 @@ class L10nEsAeatMod303Report(models.Model):
compute="_compute_marca_sepa",
)

def _get_export_config(self, date):
# Force the configuration of 2024-10 for 2024/09, as it can't be obtained with
# the usual dates search
if self.period_type == "3T" and self.year == 2024:
return self.env.ref(
"l10n_es_aeat_mod303.aeat_mod303_2024_10_main_export_config"
)
return super()._get_export_config(date)

@api.depends("partner_bank_id", "use_aeat_account")
def _compute_marca_sepa(self):
for record in self:
Expand Down Expand Up @@ -374,11 +383,9 @@ def _compute_return_last_period(self):

@api.depends("tax_line_ids", "tax_line_ids.amount")
def _compute_total_devengado(self):
casillas_devengado = (152, 3, 155, 6, 9, 11, 13, 15, 158, 18, 21, 24, 26)
cells = (152, 167, 3, 155, 6, 9, 11, 13, 15, 158, 170, 18, 21, 24, 26)
for report in self:
tax_lines = report.tax_line_ids.filtered(
lambda x: x.field_number in casillas_devengado
)
tax_lines = report.tax_line_ids.filtered(lambda x: x.field_number in cells)
report.total_devengado = report.currency_id.round(
sum(tax_lines.mapped("amount"))
)
Expand Down
1 change: 1 addition & 0 deletions l10n_es_aeat_mod303/readme/ROADMAP.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
Foral.
* Posibilidad de marcar en el resultado el ingreso/devolución en la cuenta
corriente tributaria.
* No se pueden rellenar las casillas [108] y [111] de rectificación de autoliquidación.
* No se puede rellenar la casilla [109]: Devoluciones acordadas por la Agencia
Tributaria como consecuencia de la tramitación de anteriores autoliquidaciones
correspondientes al ejercicio y período objeto de la autoliquidación.
Expand Down
13 changes: 6 additions & 7 deletions l10n_es_aeat_mod303/static/description/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,10 @@

/*
:Author: David Goodger ([email protected])
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
:Copyright: This stylesheet has been placed in the public domain.

Default cascading style sheet for the HTML output of Docutils.
Despite the name, some widely supported CSS2 features are used.

See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
customize this style sheet.
Expand Down Expand Up @@ -275,7 +274,7 @@
margin-left: 2em ;
margin-right: 2em }

pre.code .ln { color: gray; } /* line numbers */
pre.code .ln { color: grey; } /* line numbers */
pre.code, code { background-color: #eeeeee }
pre.code .comment, code .comment { color: #5C6576 }
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
Expand All @@ -301,7 +300,7 @@
span.pre {
white-space: pre }

span.problematic, pre.problematic {
span.problematic {
color: red }

span.section-subtitle {
Expand Down Expand Up @@ -425,6 +424,8 @@ <h1><a class="toc-backref" href="#toc-entry-1">Known issues / Roadmap</a></h1>
<li><p class="first">Posibilidad de marcar en el resultado el ingreso/devolución en la cuenta
corriente tributaria.</p>
</li>
<li><p class="first">No se pueden rellenar las casillas [108] y [111] de rectificación de autoliquidación.</p>
</li>
<li><p class="first">No se puede rellenar la casilla [109]: Devoluciones acordadas por la Agencia
Tributaria como consecuencia de la tramitación de anteriores autoliquidaciones
correspondientes al ejercicio y período objeto de la autoliquidación.</p>
Expand Down Expand Up @@ -505,9 +506,7 @@ <h2><a class="toc-backref" href="#toc-entry-5">Contributors</a></h2>
<div class="section" id="maintainers">
<h2><a class="toc-backref" href="#toc-entry-6">Maintainers</a></h2>
<p>This module is maintained by the OCA.</p>
<a class="reference external image-reference" href="https://odoo-community.org">
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
</a>
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
mission is to support the collaborative development of Odoo features and
promote its widespread use.</p>
Expand Down
1 change: 1 addition & 0 deletions l10n_es_aeat_mod303/tests/test_l10n_es_aeat_mod303.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,7 @@ def test_model_303(self):
"l10n_es_aeat_mod303.aeat_mod303_202107_main_export_config",
"l10n_es_aeat_mod303.aeat_mod303_2022_main_export_config",
"l10n_es_aeat_mod303.aeat_mod303_2023_main_export_config",
"l10n_es_aeat_mod303.aeat_mod303_2024_10_main_export_config",
]
for xml_id in export_config_xml_ids:
export_config = self.env.ref(xml_id)
Expand Down

0 comments on commit 1a5e781

Please sign in to comment.