odoo/odoo#249561
Created by fw-bot
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: (runtime 1736s)
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- ci/l10n: (runtime 18s)
- ci/documentation: (runtime 1194s)
- label
- odoo-dev:saas-18.3-18.0-opw-5927356-fix-agr-500246-fw
- head
- e0b9429119d1d95116d65d759e594706c8a0e78d
- merged
- 4 months ago by Accounting, Laurent Smet (las)
| odoo/odoo | |
|---|---|
| 18.0 | #248882 |
| saas-18.2 | #249524 |
| saas-18.3 | #249561 |
| saas-18.4 | #249598 |
| 19.0 | #249674 |
| saas-19.1 | #250191 |
| saas-19.2 | #250221 |
| saas-19.3 | |
| master | #250249 |
[FIX] l10n_es_edi_facturae: use currency dependent rounding for amounts
Steps to reproduce:
- Have facturae modules installed
- Generate invoice with any amount
- Send to Facturae
Issue:
Resulting XML has 8 digits after the decimal point on several fields, such as unit price, gross amount, and total cost.
When trying to validate such an XML, this results in validation error: "RCF06001: En facturas emitidas en euros, alguno de los importes de las líneas tiene más de dos decimales (regla 6a del anexo II de la Orden HAP/1650/2015)."
According to regulation HAP/1650/2015 [1]: For invoices issued in euros, it will be validated that the total line amounts related to the total cost are numeric and rounded, according to the common rounding method, to two decimal places.
This commit introduces dynamic decimal precision: 2 places for EUR and 8 places (the previous default) for other currencies.
[1] https://www.boe.es/diario_boe/txt.php?id=BOE-A-2015-8844
Machine translated BOE-A-2015-8844 (1).pdf
Forward-Port-Of: #248882