OCA / account-reconcile

Odoo account reconciliation modules (statements, data completion...)
https://odoo-community.org/psc-teams/banking-10
GNU Affero General Public License v3.0
127 stars 369 forks source link

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

Closed pedrobaeza closed 4 months ago

pedrobaeza commented 4 months ago

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 commented 4 months ago

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

/ocabot merge patch

OCA-git-bot commented 4 months ago

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 commented 4 months ago

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