-
-
Notifications
You must be signed in to change notification settings - Fork 398
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
[16][account_reconcile_oca] Foreign currency bank journal issue when currency rate changes #779
Comments
Reviewing very carefully the problem actually exists, but it is “only” with UI, if we execute the If we set a partner (or making another change in another field) some data can be changed, for example debit/credit and precisely in that case that change is not “transferred” to the |
…onization to avoid side effects We need to define skip_account_move_synchronization in the context to avoid that when writing the bank statement line, some values can be updated in the account.move.line making the information inconsistent. Related to OCA#779
…in amounts with the accounting entries It may happen in case of changes on statement line that trigger a synchronization with the accounting entries. (see OCA#779 as an example but could happen just changing the amount on the statement line for instance)
…in amounts with the accounting entries It may happen in case of changes on statement line that trigger a synchronization with the accounting entries. (see OCA#779 as an example but could happen just changing the amount on the statement line for instance)
…er_id without onchange or subsequent changes with the _synchronize_to_moves() method. We do not define partner_id with the value of manual_partner_id to prevent _synchronize_to_moves() from making changes to the account.move.line leaving unintended values and/or data. Related to OCA#779 TT52634
…er_id without onchange or subsequent changes with the _synchronize_to_moves() method. We do not define partner_id with the value of manual_partner_id to prevent _synchronize_to_moves() from making changes to the account.move.line leaving unintended values and/or data. Re-define the value of reconcile_data_info if the _synchronize_to_moves() method has changed anything on the lines. Related to OCA#779 TT52634
…er_id without onchange or subsequent changes with the _synchronize_to_moves() method. We do not define partner_id with the value of manual_partner_id to prevent _synchronize_to_moves() from making changes to the account.move.line leaving unintended values and/or data. Re-define the value of reconcile_data_info if the _synchronize_to_moves() method has changed anything on the lines. Related to OCA#779 TT52634
There is a bug with foreign currency statement lines when writing the partner on the liquidity line, explanation and how to reproduce :
Install account_reconcile_oca
At this stage with a demo database, the company currency is USD and there is just an old rate on EURO currency to convert it to USD.
Create a bank journal with EURO currency
Create a statement line in this EURO bank journal with a 1000 euros amount and go to the reconcile UI.
Go to the EURO currency and add a rate the the date of the statement line (today's date if you did not put a specific date)
Put 1.1 in the field "USD per unit"
Go back on the reconcile UI, click on the liquidity line and add a partner.
Then, you have an inconsistency between the accounting entries (
account.move.line
), where the debit and credit were updated with the current up to date rate, and the lines in the reconcile UI are still with the old rate.This happen because the write of the partner on the bank statement line triggers a synchronisation to the accounting entries with the default vals of the related accounting entry : https://github.com/OCA/OCB/blob/16.0/addons/account/models/account_bank_statement_line.py#L824
But there are not recompute of the statement line reconcile data.
Then, of course, if you try to reconcile some entries, the validation will fail, etc...
I am not sure what is the best way to fix this.I guess the liquidity lines should be updated in the reconcile data, after the partner update here https://github.com/OCA/account-reconcile/blob/16.0/account_reconcile_oca/models/account_bank_statement_line.py#L507 and the also recompute the suspense line. Or maybe clean all the reconcile data but the user could have started to do some stuff already...
Also, updating other fields of the statement line (like payment ref for instance) would also cause the same issue.
Any idea on the best way to do it ?
@etobella
@pedrobaeza you may also be interested since I saw you merged the PR with the multi-currency fixes...
The text was updated successfully, but these errors were encountered: