You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After migration of v13 DB to v14 using OpenUpgrade, when trying to reconcile a bank statement line with a payment, the following error is raised :
The journal entry BNK1/2022/0051 reached an invalid state regarding its related statement line. To be consistent, the journal entry must always have exactly one journal item involving the bank/cash account.
Analyzing this issue, from my understanding, when reconciling a bank statement line with a payment in Odoo v14, Odoo replaces the Bank Suspense Account in account_move (created automatically from bank_statement_line) by account from reconciled move. In this case, since payment were registered on the same account as bank one (512001), this causes the resulting move with 2 lines on the same bank account. Odoo is expecting to have only one bank account in this move and therefore raises the error.
Basically a customer payment in Odoo 13 and before created the following move lines :
Debit 50 € on account 512001 (Bank)
Credit 50 € on account 411000 (Receivable)
When a payment in Odoo 14 creates the following move lines :
Debit 50 € on account 512003 (Outstanding Receipts)
Credit 50 € on account 411000 (Receivable)
The workaround consists in rewriting the 512001 in 512003 on outstanding payment move lines.
This could be done automatically in post_install script (after outstanding payment account is automatically created in
Hi @MiquelRForgeFlow@pedrobaeza do you think it is acceptable to rewrite account_move_lines related to outstanding payments to change bank account to outstanding receipt account (the same should probably be done for outgoing payments as well) ?
Module
account
Describe the bug
After migration of v13 DB to v14 using OpenUpgrade, when trying to reconcile a bank statement line with a payment, the following error is raised :
The journal entry BNK1/2022/0051 reached an invalid state regarding its related statement line. To be consistent, the journal entry must always have exactly one journal item involving the bank/cash account.
Analyzing this issue, from my understanding, when reconciling a bank statement line with a payment in Odoo v14, Odoo replaces the Bank Suspense Account in account_move (created automatically from bank_statement_line) by account from reconciled move. In this case, since payment were registered on the same account as bank one (512001), this causes the resulting move with 2 lines on the same bank account. Odoo is expecting to have only one bank account in this move and therefore raises the error.
Basically a customer payment in Odoo 13 and before created the following move lines :
Debit 50 € on account 512001 (Bank)
Credit 50 € on account 411000 (Receivable)
When a payment in Odoo 14 creates the following move lines :
Debit 50 € on account 512003 (Outstanding Receipts)
Credit 50 € on account 411000 (Receivable)
The workaround consists in rewriting the 512001 in 512003 on outstanding payment move lines.
This could be done automatically in post_install script (after outstanding payment account is automatically created in
OpenUpgrade/openupgrade_scripts/scripts/account/14.0.1.1/post-migration.py
Line 566 in f96fc32
To Reproduce
Affected versions: migration 13 to 14
Steps to reproduce the behavior:
Expected behavior
Reconciliation is properly handled
The text was updated successfully, but these errors were encountered: