Daily updates from Odoo
Monday, June 9, 2025
1 change
Enhancements to existing features
Bank synchronization and reconciliation now handle foreign currencies more reliably, including showing currency symbols that were previously missing. Users also get clearer details on multi-currency statement amounts, exchange differences, and partial reconciliations, reducing confusion and avoiding incorrect suspense or exchange difference amounts.
Original PR description
[FIX] account_online_synchronization: currencies symbol missing Before this commit when doing a bank synchronization with a currency that wasn't enabled, the currency was not reloaded in the session…
[FIX] account_online_synchronization: currencies symbol missing Before this commit when doing a bank synchronization with a currency that wasn't enabled, the currency was not reloaded in the session and so the getCurrency function was not working properly. The symbol was not displayed. task-4749335 This commit will change a bit the display of statement line with multi currency. A popover has been added when clicking on the amount to have extra line info like the exchange difference and when we have a partial reconcile. - Correcting a bug where the amount currency of the suspense was wrong when dealing with currencies (delete or adding lines). For example when dealing with JPY currency (that have a rounding of 1). Making an invoice for 100 yen and a statement line of 50 yen. When adding the line and removing it, we could have rounding issue since we calculate the amount currency by multiplying the balance and the currency rate. In this example we achieve a suspense line of 49 when it should be 50. - Correcting another bug with exchange diff. In the same case, we had an exchange difference value of 0.01 in _lines_get_account_balance_exchange_diff which shouldn't be there. In prior version of 18.3 we checked that the origin_balance minus move_line.balance was zero in the currency of the move line as well as the one from the company and if that was the case no exchange move line were created. And since there were no exchange move line the exchange move was not created. In this commit, I reintroduce the logic of checking the move line currency to return 0.0 but that was not enough since the reconcile_plan function would still create the exchange move since we were not using the context key anymore. So now if the exchange value is 0 then we pass the context key to avoid having an exchange move. - Also doing some formatting because the linter was not correctly applied. - Correcting also a case where the reconciled_lines_ids has multiple line in case of exchange diff, which cased a traceback since is_invoice needs a singleton. - When having a foreign currency, the suspense amount is displayed in the foreign currency but when adding move line with the same currency, due to the computation on the amount_currency we could have situation where the amounts don't add up. We decided that if there is a foreign currency and that all the lines are in the foreign currency we do an addition of the amount currency otherwise we display the suspense in journal currency. For this we had to use the self.amount_currency because the liquidity line is not modified when modifying the amount currency of the statement line itself. (Tried to synchro the move and more in particular the liquidity line but had a constraint failing) - When doing an apply amount of a line that has multiple value in the reconcilied_lines_ids, it gives a traceback because we want to get the current_ids of a dict of multiple values task-4749335