Monday, April 21, 2025
1 change · saas-17.2
Resolved issues and error corrections
The Unrealized Currency Gains/Losses report now only accepts numeric exchange rates. This prevents users from accidentally entering letters or symbols that caused the report to crash.
Original PR description
A traceback occurs when the user changes the exchange rates in the `account_multicurrency_revaluation_report`. To reproduce this issue: 1) Activate multi-currency from…
A traceback occurs when the user changes the exchange rates in the `account_multicurrency_revaluation_report`. To reproduce this issue: 1) Activate multi-currency from `Accounting/Configuration/Currencies` 2) Open `Unrealized Currency Gains/Losses` report 3) Change the rate exchanges by giving any `special-characters/letters` Error:- ``` ValueError: could not convert string to float: '0,0025thsg' ``` This is because initially, the input type for exchange rates was number. However, due to major improvements from this commit, it was changed to text. https://github.com/odoo/enterprise/pull/55012/commits/0f8de4c15656b151a83c869dd81d1d62aab52f70 Indeed, the user can give any letter or special character when the input type is text. This leads to traceback at multiple lines https://github.com/odoo/enterprise/blob/861a071f655a9d46ce8bf502575e9e2303fc1174/account_reports/models/account_multicurrency_revaluation_report.py#L54 The currency exchange rates should be numbers. So changing the input type to number can resolve this issue. sentry-5770342702