odoo/odoo#202986
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: Contact runbot team on discord for help.
- 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 0s)
- label
- odoo-dev:saas-17.4-16.0-opw-4567098-fix_l10n_ke_edi_tremol_conversion_currency-pta-424657-fw
- head
- 5c91b83541296f00ce073335f304cae6223b85ab
- merged
- 7 months ago by Bugfix, Anh Thao Pham (pta)
odoo/odoo | |
---|---|
16.0 | #202706 |
17.0 | #202888 |
saas-17.4 | #202986 |
18.0 | #202998 |
saas-18.1 | #203042 |
saas-18.2 | #203043 |
saas-18.3 | |
saas-18.4 | |
19.0 | |
master | #203045 |
[FW][FIX] l10n_ke_edi_tremol: use currency precision when sending to fiscal device
Steps to reproduce:
- Install Accounting and l10n_ke_edi_tremol
- Switch to a Kenyan company (e.g. KE Company)
- Configure USD currency:
* Rounding Factor: 0.000100
* Decimal Places: 4
* Rate: 0.007729205731 Unit per KES 129.379400000000 KES per Unit
- Create a product with decimal in the price (e.g. 1234.56)
- Create an invoice:
* Customer: [a Kenyan customer]
* Currency: USD
* Product: [the created product]
* Taxes: 16%
- Confirm the invoice
- Send the invoice to fiscal device (It will not be possible without some credentials. However, if a breakpoint is set at the last line ("return" line) of "_l10n_ke_cu_lines_messages" method, the total amount in KSh sent to the fiscal device can be checked.)
Issue:
The total amount in KSh sent to the fiscal device is different than the total amount in USD converted to KSh with the used currency rate.
Cause:
In the "_l10n_ke_cu_lines_messages" method (the method used to compute the amounts sent to the fiscal device), a rounding is done by forcing the number of decimal to 2 without taking into account the configuration of the currency when computing the price.
I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr