account-reconcile
account-reconcile copied to clipboard
account_reconcile_oca : wrong reconciliation of account if foreign currency
Hello @etobella
We meet some blocking issues when trying the statement reconciliation involving currencies different from the company currency. Here is a first general issue, I'd like to have your feedback. I'll create other issues that may be linked to this one, one way or another. I join a shell script (at the end on the issue) to easily configure what is needed to reproduce the issue on a demo database with only account_reconcile_oca installed.
Set up (run the script if you prefer) :
- Active euro currency if not done already
- Create e Bank journal with currency = Euro
- Create a bank statement line in the bank journal in Euro
Then, goes to the reconcile UI, the currency amount of the suspense line is wrong, as it is in USD, should be in euro
At the contrary, at this step, the accounting entry is ok, the suspense line is in EUR
Then if I choose an account in manual operation tab, say the 121000 and the validate :
The accounting entry is now wrong, as the currency of the counterpart is soudainly in company currency (USD). I expect it to be in EUR, only the account should have changed for the initial accounting entry generated.
I'll gladly help on the matter although I am not (yet) confortable with the technical part of the module, let me know what you think. Thanks for all your work on this matter.
Shell script :
eur = env.ref("base.EUR")
eur.write({'active': True})
eur_journal = env["account.journal"].create({
"name": "Bank EUR",
"type": "bank",
"currency_id": eur.id,
})
eur_statement = env["account.bank.statement"].create({
"name": "TEST 1 CNY",
"journal_id": eur_journal.id,
"line_ids": [(0, 0, {
"date": "2024-09-10",
"journal_id": eur_journal.id,
"payment_ref": "VIR CUSTOMER",
"amount": 100,
"currency_id": eur.id,
})],
})