Skip to content

[17.0][ADD] l10n_es_atc_sii_oca: New module - #4203

Merged
OCA-git-bot merged 4 commits into
OCA:17.0from
Tecnativa:17.0-ADD-l10n_es_atc_sii_oca
Feb 27, 2026
Merged

[17.0][ADD] l10n_es_atc_sii_oca: New module#4203
OCA-git-bot merged 4 commits into
OCA:17.0from
Tecnativa:17.0-ADD-l10n_es_atc_sii_oca

Conversation

@sergio-teruel

@sergio-teruel sergio-teruel commented May 19, 2025

Copy link
Copy Markdown
Contributor

@sergio-teruel
sergio-teruel force-pushed the 17.0-ADD-l10n_es_atc_sii_oca branch from c4d7001 to 7c3b8f6 Compare May 19, 2025 21:03
@syci

syci commented May 27, 2025

Copy link
Copy Markdown

Hola @sergio-teruel @Christian-RB @pedrobaeza precisamente estoy revisando el PR #4097 y echaba en falta el mapeo de los impuestos del IGIC para el SII. Al igual que tenemos en

<record id="aeat_sii_map_line_DUA" model="aeat.sii.map.lines">
donde se referencian los impuestos para el DUA.

Entiendo que en este módulo se añade la parte del DUA a nivel de registro SII con el tipo de factura F5 y en el otro l10n_es_igic aplicará la lógica contable. ¿?

@pedrobaeza

Copy link
Copy Markdown
Member

@sergio-teruel esto está ya listo?

@sergio-teruel
sergio-teruel force-pushed the 17.0-ADD-l10n_es_atc_sii_oca branch from 2ea7a47 to a77c606 Compare January 9, 2026 06:10
@pedrobaeza
pedrobaeza force-pushed the 17.0-ADD-l10n_es_atc_sii_oca branch from a77c606 to 4b700ef Compare January 12, 2026 18:42
@sergio-teruel
sergio-teruel marked this pull request as ready for review January 13, 2026 16:58
@sergio-teruel
sergio-teruel force-pushed the 17.0-ADD-l10n_es_atc_sii_oca branch from 1359adf to 95e1464 Compare February 24, 2026 13:52
@sergio-teruel

Copy link
Copy Markdown
Contributor Author

This PR is ready for merge...

ping @christian-ramos-tecnativa

@christian-ramos-tecnativa christian-ramos-tecnativa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lo veo bien

@carlos-lopez-tecnativa carlos-lopez-tecnativa left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review, solo un comentario no bloqueante.
¿Los commits se pueden unificar, al ser todos de un mismo módulo nuevo?

Comment on lines +50 to +71
def _get_aeat_invoice_dict_out(self, cancel=False):
inv_dict = super()._get_aeat_invoice_dict_out(cancel=cancel)
if self._get_sii_tax_agency() == self.env.ref(
"l10n_es_aeat.aeat_tax_agency_canarias"
):
inv_dict = self._sii_atc_replace_tax_keys(inv_dict)
return inv_dict

def _get_aeat_invoice_dict_in(self, cancel=False):
inv_dict = super()._get_aeat_invoice_dict_in(cancel=cancel)
if self._get_sii_tax_agency() == self.env.ref(
"l10n_es_aeat.aeat_tax_agency_canarias"
):
inv_dict = self._sii_atc_replace_tax_keys(inv_dict)
return inv_dict

def _get_sii_identifier(self):
if self._get_sii_tax_agency() == self.env.ref(
"l10n_es_aeat.aeat_tax_agency_canarias"
):
self = self.with_context(is_canary_tax_agency=True)
return super()._get_sii_identifier()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

¿Por qué no crear un método que devuelva si es agencia canaria o no?

Suggested change
def _get_aeat_invoice_dict_out(self, cancel=False):
inv_dict = super()._get_aeat_invoice_dict_out(cancel=cancel)
if self._get_sii_tax_agency() == self.env.ref(
"l10n_es_aeat.aeat_tax_agency_canarias"
):
inv_dict = self._sii_atc_replace_tax_keys(inv_dict)
return inv_dict
def _get_aeat_invoice_dict_in(self, cancel=False):
inv_dict = super()._get_aeat_invoice_dict_in(cancel=cancel)
if self._get_sii_tax_agency() == self.env.ref(
"l10n_es_aeat.aeat_tax_agency_canarias"
):
inv_dict = self._sii_atc_replace_tax_keys(inv_dict)
return inv_dict
def _get_sii_identifier(self):
if self._get_sii_tax_agency() == self.env.ref(
"l10n_es_aeat.aeat_tax_agency_canarias"
):
self = self.with_context(is_canary_tax_agency=True)
return super()._get_sii_identifier()
def _is_canarias_sii_tax_agency(self):
return self._get_sii_tax_agency() == self.env.ref(
"l10n_es_aeat.aeat_tax_agency_canarias"
)
def _get_aeat_invoice_dict_out(self, cancel=False):
inv_dict = super()._get_aeat_invoice_dict_out(cancel=cancel)
if self._is_canarias_sii_tax_agency():
inv_dict = self._sii_atc_replace_tax_keys(inv_dict)
return inv_dict
def _get_aeat_invoice_dict_in(self, cancel=False):
inv_dict = super()._get_aeat_invoice_dict_in(cancel=cancel)
if self._is_canarias_sii_tax_agency():
inv_dict = self._sii_atc_replace_tax_keys(inv_dict)
return inv_dict
def _get_sii_identifier(self):
if self._is_canarias_sii_tax_agency():
self = self.with_context(is_canary_tax_agency=True)
return super()._get_sii_identifier()

@cubells cubells left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

LGTM

Code review and test

@pedrobaeza

Copy link
Copy Markdown
Member

/ocabot merge nobump

@OCA-git-bot

Copy link
Copy Markdown
Contributor

What a great day to merge this nice PR. Let's do it!
Prepared branch 17.0-ocabot-merge-pr-4203-by-pedrobaeza-bump-nobump, awaiting test results.

@OCA-git-bot
OCA-git-bot merged commit 86069f4 into OCA:17.0 Feb 27, 2026
5 of 7 checks passed
@OCA-git-bot

Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at 180d16c. Thanks a lot for contributing to OCA. ❤️

@pedrobaeza
pedrobaeza deleted the 17.0-ADD-l10n_es_atc_sii_oca branch February 27, 2026 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants