Skip to content
Snippets Groups Projects
Commit 34e6b2f7 authored by Antoine Dupuis (andu)'s avatar Antoine Dupuis (andu)
Browse files

[FIX] l10n_it_edi: Generate correct XML for negative invoice lines


When creating an invoice with a positive line and a negative line, with
different taxes, the DatiRiepilogo node for the tax of the negative
line contained positive amounts when they should be negative.

This is because we were applying `abs()` too naively in the XML template
and in the code of _l10n_it_edi_prepare_fatturapa_tax_details.

This bugfix commit changes the logic to no longer use abs().

We also include a test to check that the XML is correctly generated for
credit notes.

Back-port of #121933

opw-3316300

closes odoo/odoo#125198

X-original-commit: 17f336e4
Signed-off-by: default avatarJosse Colpaert <jco@odoo.com>
Signed-off-by: default avatarAntoine Dupuis (andu) <andu@odoo.com>
parent d127b6ec
No related branches found
No related tags found
No related merge requests found
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