Skip to content
Snippets Groups Projects
Commit 47c47bf2 authored by Julien Van Roy's avatar Julien Van Roy Committed by Laurent Smet
Browse files

[FIX] account_edi_ubl_cii: handle fixed taxes in UBL/CII


Use case: the eco-taxes (recupel, auvibel, etc) are fixed taxes in Odoo,
which apply before the "regular" (percentage) tax on an invoice line. We
can have one or more fixed taxes and 1 regular tax.

In EN16931, there can only be 1 tax per invoice line. Thus, the fixed
taxes are encoded as charge on the invoice lines (with reason code
`AEO`: "Collection and recycling"). The tags `AllowanceCharge` (in UBL)
and `SpecifiedTradeAllowanceCharge` (in CII) are used. Then a serie of
tax related infos need to be changed: the taxes in UBL/CII should not
contain the fixed ones and the total untaxed amount needs to be adapted,
as well as the total tax amount (since the fixed taxes were removed).

To be able to import the fixed taxes back in Odoo, the charges on the
invoice lines are read and their names and amounts are used to search on
the existing taxes.

task-3274208

closes odoo/odoo#122955

X-original-commit: 49ba394a
Signed-off-by: default avatarLaurent Smet <las@odoo.com>
parent 40cda80b
No related branches found
No related tags found
No related merge requests found
Showing
with 1225 additions and 54 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment