Skip to content
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

[15.0][FIX] account_reconciliation_widget: Avoid unbalanced foreign currency reconciliations + exclude own amls in reconcile models propositions #633

Conversation

pedrobaeza
Copy link
Member

Forward-port of #603

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

@pedrobaeza pedrobaeza added this to the 15.0 milestone Feb 24, 2024
…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
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
@pedrobaeza pedrobaeza force-pushed the 15.0-fix-account_reconciliation_widget-foreign_currency_unbalanced branch from 13bae58 to 540a667 Compare February 24, 2024 11:38
@pedrobaeza
Copy link
Member Author

Merging as already approved and battle-tested for months in 14.0:

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 15.0-ocabot-merge-pr-633-by-pedrobaeza-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit b22a4c6 into OCA:15.0 Feb 24, 2024
5 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at 9d96d0d. Thanks a lot for contributing to OCA. ❤️

@pedrobaeza pedrobaeza deleted the 15.0-fix-account_reconciliation_widget-foreign_currency_unbalanced branch February 24, 2024 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants