Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0][FIX] l10n_es_ticketbai: Impuesto 0% ISP no exento #3354

Closed
wants to merge 1 commit into from
Closed

[16.0][FIX] l10n_es_ticketbai: Impuesto 0% ISP no exento #3354

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Dec 29, 2023

No description provided.

@OCA-git-bot
Copy link
Contributor

Hi @ao-landoo,
some modules you are maintaining are being modified, check this out!

@@ -24,6 +24,9 @@ def tbai_is_subject_to_tax(self):
return self not in s_iva_ns_taxes

def tbai_is_tax_exempted(self):
isp_no_exempted = self.env.ref("l10n_es.1_account_tax_template_s_iva0_isp").id
Copy link
Contributor

Choose a reason for hiding this comment

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

Ojo porque estás comparando un "account.tax.template" con un "account.tax". Entiendo que quieres comprar el impuesto creado por la template "l10n_es.1_account_tax_template_s_iva0_isp" para la compañía correspondiente ¿correcto?

Copy link
Author

Choose a reason for hiding this comment

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

Si efectivamente, estaba viendo claro siempre he tirado de metadatos por interfaz. ¿podéis decirme como debería ser por favor?

Copy link
Member

Choose a reason for hiding this comment

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

Tenéis un método en l10n_es_aeat para obtener el impuesto de una compañía a partir del impuesto plantilla.

Copy link
Author

Choose a reason for hiding this comment

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

Entiendo que pasando la plantilla aquí self.company_id.get_taxes_from_templates('l10n_es.1_account_tax_template_s_iva0_isp') me devuelve los impuestos generados y luego ya solo es comprobar el id del impuesto con el resultado de esa función "ids"

Copy link
Member

Choose a reason for hiding this comment

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

No, debes usar self.company_id.get_taxes_from_templates(self.env.ref('l10n_es.account_tax_template_s_iva0_isp'))

El 1 es el identificador de compañía.

Copy link
Contributor

Choose a reason for hiding this comment

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

exacto!!

Copy link
Member

@etobella etobella left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@etobella etobella left a comment

Choose a reason for hiding this comment

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

Ui, viendo el comentario de Valentin, veo un problema, esto solo te funcionará con la compañía 1, no con el resto...

@ValentinVinagre
Copy link
Contributor

Ui, viendo el comentario de Valentin, veo un problema, esto solo te funcionará con la compañía 1, no con el resto...

y eso... teniendo el caso de que le coincida con id... porque si no, ni eso jaja.

@etobella
Copy link
Member

@aritzolea como autor original del módulo, podríamos contar tu revisión?

@ghost

This comment was marked as off-topic.

@pedrobaeza
Copy link
Member

Para el otro comentario, abre si quieres una nueva issue, pero no hagamos off-topics aquí, por favor.

@pedrobaeza pedrobaeza added this to the 16.0 milestone Jan 5, 2024
@pedrobaeza
Copy link
Member

Tienes que hacer squash de todos los commits en uno.

[16.0][FIX] l10n_es_ticketbai: Impuesto 0% ISP no exento

[FIX] Corrijo id de plantilla impuestos 0% isp

Update l10n_es_ticketbai/models/account_tax.py

Co-authored-by: Pedro M. Baeza <[email protected]>
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.

5 participants