-
-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[14.0][FIX] account_reconciliation_widget: Avoid unbalanced foreign currency reconciliations + exclude own amls in reconcile models propositions #603
Conversation
…y reconciliations When having a statement line in a foreign currency, each resulting journal item computes the debit/credit amount from the foreign currency rate, and then rounding the result to company currency digits. There's a chance in this process that the journal entry final balance is not 0 summing the rounded balances in company currency. For fixing this, there can be several strategies, like creating an extra journal item for the difference, but I have opted for removing the difference in the latest counterpart aml, so no extra noise and no need of account decision algorithm for this extra move. As currency amounts are correct and are the ones used in reconciliation, there won't be any problem adjusting this amount. TT45568
8c9e613
to
2a1171d
Compare
When getting propositions from the reconcile models, we should explicitly exclude the amls of the bank statement lines. If not, we can get a situation where the journal item of the bank statement line is proposed to itself. TT45568
Added an extra commit for a discovered situation testing the other patch: the journal item of a bank statement line can be proposed to itself in the reconciliation widget. This patch also requires a patch in Odoo: odoo/odoo#139419 |
/ocabot merge patch |
Hey, thanks for contributing! Proceeding to merge this for you. |
Congratulations, your PR was merged at 2548da4. Thanks a lot for contributing to OCA. ❤️ |
When having a statement line in a foreign currency, each resulting journal item computes the debit/credit amount from the foreign currency rate, and then rounding the result to company currency digits.
There's a chance in this process that the journal entry final balance is not 0 summing the rounded balances in company currency.
For fixing this, there can be several strategies, like creating an extra journal item for the difference, but I have opted for removing the difference in the latest counterpart aml, so no extra noise and no need of account decision algorithm for this extra move.
As currency amounts are correct and are the ones used in reconciliation, there won't be any problem adjusting this amount.
@Tecnativa TT45568