[17.0][ADD] l10n_es_atc_sii_oca: New module - #4203
Conversation
c4d7001 to
7c3b8f6
Compare
|
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 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. ¿? |
a343cdc to
d4c9677
Compare
|
@sergio-teruel esto está ya listo? |
2ea7a47 to
a77c606
Compare
a77c606 to
4b700ef
Compare
…xists in SII atc TT60254
1359adf to
95e1464
Compare
|
This PR is ready for merge... |
christian-ramos-tecnativa
left a comment
There was a problem hiding this comment.
Lo veo bien
carlos-lopez-tecnativa
left a comment
There was a problem hiding this comment.
Code review, solo un comentario no bloqueante.
¿Los commits se pueden unificar, al ser todos de un mismo módulo nuevo?
| 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() |
There was a problem hiding this comment.
¿Por qué no crear un método que devuelva si es agencia canaria o no?
| 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() |
|
/ocabot merge nobump |
|
What a great day to merge this nice PR. Let's do it! |
|
Congratulations, your PR was merged at 180d16c. Thanks a lot for contributing to OCA. ❤️ |
cc @Tecnativa
ping @carlosdauden @carlos-lopez-tecnativa @syci @christian-ramos-tecnativa