Skip to content

Conversation

eLBati
Copy link
Member

@eLBati eLBati commented Sep 26, 2025

The method has been removed from Odoo core in odoo/odoo@0f66a0c.
Without this change, the following is raised:
AttributeError: 'account.tax' object has no attribute '_l10n_it_get_tax_kind'
@monen17 monen17 force-pushed the 18.0-_l10n_it_get_tax_kind branch from a060766 to 23fd5e5 Compare September 26, 2025 09:39
Copy link
Contributor

@monen17 monen17 left a comment

Choose a reason for hiding this comment

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

Ho aggiustato il titolo del commit che era
image

Ho qualche dubbio sulla modifica, vedi il commento qui sotto

Comment on lines +35 to +38
def _l10n_it_get_tax_kind(self):
if self.amount_type == "percent" and self.amount >= 0:
return "vat"
return None
Copy link
Contributor

Choose a reason for hiding this comment

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

Se c'è installato l10n_it_edi_withholding, l'imposta self poteva essere di tipo withholding o pension_fund, vedi l'override nel commit odoo/odoo@0f66a0c mentre ora il metodo restituirà sempre e solo vat o None, quindi in pratica

lambda tax: tax._l10n_it_get_tax_kind() in [None, "vat"]
accetterà tutte le imposte, invece di filtrare come faceva prima di odoo/odoo@0f66a0c.

Visto che l10n_it_edi_withholding non è tra le dipendenze (e non credo vada aggiunto), penso sia meglio invece adattare i punti in cui viene chiamato _l10n_it_get_tax_kind per usare invece _l10n_it_filter_kind; cosa ne pensi?

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.

AttributeError: 'account.tax' object has no attribute '_l10n_it_get_tax_kind'
3 participants