[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().
opw-3316300
closes odoo/odoo#121933
Signed-off-by:
Quentin De Paoli <qdp@odoo.com>
Showing
- addons/l10n_it_edi/data/invoice_it_template.xml 2 additions, 3 deletionsaddons/l10n_it_edi/data/invoice_it_template.xml
- addons/l10n_it_edi/models/account_invoice.py 0 additions, 4 deletionsaddons/l10n_it_edi/models/account_invoice.py
- addons/l10n_it_edi/tests/test_edi_export.py 29 additions, 2 deletionsaddons/l10n_it_edi/tests/test_edi_export.py
Loading
Please register or sign in to comment