Commit Graph
2 Commits
Author SHA1 Message Date
Ugaitz Olaizola 6a90fee4c1 [FIX] l10n_es_edi_tbai, sudo on company when creating TicketBAI chain sequence for the first time.
Before this commit:

When creating the first invoice TicketBAI chain sequence does not exists therefore it is created, if user does not belong to Administration/Settings
group, an access error is raised and invoice is not posted. In the same time, a write operation is done in the company to set the value of the sequence
on l10n_es_tbai_chain_sequence_id field, and writing in a company only is allowed for users that belongs to Administration/Settings.

With this commit:

We make a sudo in self (res.company), no errors are raised, invoice is posted and TicketBAI XML file is created and posted to the agency.

closes odoo/odoo#163432

X-original-commit: 55bb16a6b5c44a86cf20f29c4cd705bb2403ae27
Signed-off-by: William André (wan) <wan@odoo.com>
2024-04-26 08:22:54 +00:00
Ugaitz Olaizola c8146daf6c [IMP] l10n_es_edi_tbai, support out invoices with taxes of type "retención":
Do not take into account "retención" type taxes in the sum of the total price of the invoice lines,
these taxes are of retention types and are declared in RetencionSoportada XML node.

Add amount_retention in invoice values and change template_invoice_factura to activate RetencionSoportada xml node.

Before this commit:

Invoices with "retención" type taxes are not declared correctly, validation errors in the response of the tax agency.

With this commit:

Invoices with "retención" type taxes are declared correctly and accepted with no validation errors in the response of the tax agency.

closes odoo/odoo#152978

X-original-commit: ff961775d7f175c4f71f33f9b3955c04a234db55
Signed-off-by: Josse Colpaert <jco@odoo.com>
2024-02-07 18:34:22 +00:00