[FIX] account_edi_ubl_cii: unit prices should not be rounded
When unit prices have more than 2 digits, it is currently not reflected in the UBL formats. Consequently, the line amounts are not equal to the unit price * quantity (assume there is no discount, charges or allowance) and it raises validation errors: "Invoice line net amount MUST equal (Invoiced quantity * (Item net price/item price base quantity) + Sum of invoice line charge amount - sum of invoice line allowance amount". To fix this, we no longer round the unit prices. NB: the decimal accuracy should be set in the settings (otherwise, the default is 2 digits for unit prices). See https://docs.peppol.eu/poacc/billing/3.0/bis/#_rounding opw-3290035 task-3302904 closes odoo/odoo#120821 Signed-off-by:Laurent Smet <las@odoo.com>
Showing
- addons/account_edi_ubl_cii/data/ubl_20_templates.xml 1 addition, 1 deletionaddons/account_edi_ubl_cii/data/ubl_20_templates.xml
- addons/account_edi_ubl_cii/models/account_edi_xml_ubl_20.py 2 additions, 1 deletionaddons/account_edi_ubl_cii/models/account_edi_xml_ubl_20.py
- addons/l10n_account_edi_ubl_cii_tests/tests/test_files/from_odoo/bis3_out_invoice_rounding.xml 126 additions, 0 deletions.../tests/test_files/from_odoo/bis3_out_invoice_rounding.xml
- addons/l10n_account_edi_ubl_cii_tests/tests/test_xml_ubl_be.py 27 additions, 0 deletions...s/l10n_account_edi_ubl_cii_tests/tests/test_xml_ubl_be.py