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

account_reconcile_oca : wrong reconciliation of account if foreign currency #692

Open
florian-dacosta opened this issue Sep 13, 2024 · 5 comments · May be fixed by #694
Open

account_reconcile_oca : wrong reconciliation of account if foreign currency #692

florian-dacosta opened this issue Sep 13, 2024 · 5 comments · May be fixed by #694
Labels

Comments

@florian-dacosta
Copy link
Contributor

florian-dacosta commented Sep 13, 2024

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
1-first-screen-wrong-curr

At the contrary, at this step, the accounting entry is ok, the suspense line is in EUR
2-accounting-entry-ok

Then if I choose an account in manual operation tab, say the 121000 and the validate :
3-manual-counterpart

4-reconciled-move-wrong-curr

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,
    })],
})
@etobella
Copy link
Member

@florian-dacosta Which version are you working on?

@florian-dacosta
Copy link
Contributor Author

Latest version 16, I'll update

@etobella
Copy link
Member

Will you be at Liege this year? Maybe it would be good to check this there. WDYT?

@florian-dacosta
Copy link
Contributor Author

florian-dacosta commented Sep 13, 2024

I will be there yes.
But I need to fix it ASAP, we have an angry customer which is blocked with this for a while (the Previous Alexis issue on the matter concerns the same customer).

So if you have time to check it before, it will be great (and we are willing to pay for your time on the matter of course).
If you don't, I'll try to dig into it, and patch it, at least of my side and then we'll discuss it at Liege.
Let me know !

@etobella
Copy link
Member

@florian-dacosta Let me give a fast try 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants