-
-
Notifications
You must be signed in to change notification settings - Fork 535
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
Conversation
Hi @ao-landoo, |
@@ -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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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"
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exacto!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this 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...
y eso... teniendo el caso de que le coincida con id... porque si no, ni eso jaja. |
@aritzolea como autor original del módulo, podríamos contar tu revisión? |
This comment was marked as off-topic.
This comment was marked as off-topic.
Para el otro comentario, abre si quieres una nueva issue, pero no hagamos off-topics aquí, por favor. |
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]>
No description provided.