odoo/odoo#121662

Created by fw-bot
Merged at a022de4fbf283dc825ffbcb320aabe49afddcd09

Statuses:

label
odoo-dev:saas-16.3-14.0-ubl-do-not-round-price-amount-juvr-OPQl-fw
head
22650062beb4fb658402c69297c9b59a54b4461a
merged
2 years ago by Julien Van Roy (juvr)
odoo/odoo
14.0 #120821
15.0 #121508
saas-15.2 #121553
16.0 #121559
saas-16.1 #121567
saas-16.2 #121573
saas-16.3 #121662
master #121649 #121864

[FW][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

Forward-Port-Of: #121573
Forward-Port-Of: #120821