Skip to content

Conversation

@juancarlosonate-tecnativa
Copy link
Contributor

@juancarlosonate-tecnativa juancarlosonate-tecnativa commented Aug 7, 2025

@juancarlosonate-tecnativa juancarlosonate-tecnativa force-pushed the 14.0-add-l10n_es_tax_canon_digital branch 5 times, most recently from 5cc6dbb to e6384c6 Compare August 11, 2025 10:30
@juancarlosonate-tecnativa juancarlosonate-tecnativa changed the title [14.0][ADD] l10n_es_tax_canon_digital [14.0][ADD] l10n_es_tax_digital_canon Aug 11, 2025
@pedrobaeza pedrobaeza added this to the 14.0 milestone Aug 11, 2025
@juancarlosonate-tecnativa juancarlosonate-tecnativa marked this pull request as draft August 11, 2025 17:25
@juancarlosonate-tecnativa juancarlosonate-tecnativa force-pushed the 14.0-add-l10n_es_tax_canon_digital branch from e6384c6 to 50c07a8 Compare August 11, 2025 17:26
@juancarlosonate-tecnativa juancarlosonate-tecnativa changed the title [14.0][ADD] l10n_es_tax_digital_canon [14.0][ADD] l10n_es_digital_canon Aug 11, 2025
_inherit = "account.move.line"

def _get_computed_taxes(self):
self.ensure_one()
Copy link
Member

Choose a reason for hiding this comment

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

Esto no debería hacer falta.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No he encontrado otra manera, a nivel de línea de factura no pasa nunca el producto por el map_tax

Copy link
Member

Choose a reason for hiding this comment

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

Según veo, esto ocurre por este condicional:

https://github.com/odoo/odoo/blob/5cd0df5c813aae3da9b82e3fa986269f2b38e71b/addons/account/models/account_move.py#L3612

en el que si no tiene posición fiscal asignada, no hace esa llamada. Lo que tú puedes hacer es sobreescribir ese método y hacer la misma llamada al método cuando no hay posición fiscal.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No solo se maneja en ese caso, sino que hay varios métodos onchange que lo llaman sin producto. En _set_price_and_tax_after_fpos, los taxes ya están asignados, y todas las demás llamadas a map_tax obtienen los impuestos a través de _get_computed_taxes

@juancarlosonate-tecnativa juancarlosonate-tecnativa force-pushed the 14.0-add-l10n_es_tax_canon_digital branch from 50c07a8 to 0975a7d Compare August 12, 2025 15:14
@juancarlosonate-tecnativa juancarlosonate-tecnativa marked this pull request as ready for review August 12, 2025 15:38
@juancarlosonate-tecnativa juancarlosonate-tecnativa force-pushed the 14.0-add-l10n_es_tax_canon_digital branch 2 times, most recently from b18df2e to 05480c1 Compare August 25, 2025 14:52
@juancarlosonate-tecnativa
Copy link
Contributor Author

ping @carlosdauden

@juancarlosonate-tecnativa juancarlosonate-tecnativa force-pushed the 14.0-add-l10n_es_tax_canon_digital branch 3 times, most recently from fa547e4 to 1a9106a Compare September 2, 2025 11:54
@juancarlosonate-tecnativa juancarlosonate-tecnativa force-pushed the 14.0-add-l10n_es_tax_canon_digital branch 3 times, most recently from 596ec44 to 4581284 Compare September 2, 2025 17:43
@juancarlosonate-tecnativa juancarlosonate-tecnativa force-pushed the 14.0-add-l10n_es_tax_canon_digital branch from 4581284 to 5a15cc2 Compare October 2, 2025 14:08
@juancarlosonate-tecnativa juancarlosonate-tecnativa force-pushed the 14.0-add-l10n_es_tax_canon_digital branch from 5a15cc2 to 0aa3da6 Compare November 4, 2025 08:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants