odoo/enterprise#94899
Created by fw-bot
Statuses:
- legal/cla: Contributor License Agreement check
- ci/runbot: Odoo Test Suite
- ci/upgrade_enterprise: Test upgrades for enterprise master
- ci/template: Contact runbot team on discord for help.
- ci/style: Optional style check. Ignore it only if strictly necessary.
- ci/security: Required security check. Can only be ignored by security team.
- ci/l10n: (runtime 0s)
- label
- odoo-dev:17.0-16.0-opw-4663059-no_cash_basis_move_from_bank_move-pta-460143-fw
- head
- 6bd85dc2664d189e80ffafc0063033e9a41c8e8e
- merged
- 8 months ago by Bugfix, Anh Thao Pham (pta)
| odoo/odoo | odoo/enterprise | |
|---|---|---|
| 16.0 | #225151 | #93735 |
| 17.0 | #227419 | #94899 |
| 18.0 | #227506 | #94932 |
| saas-18.2 | #227612 | #94994 |
| saas-18.3 | #227624 | #94999 |
[FIX] account_accountant: no cash basis move from bank entry
Steps to reproduce:
- Install Accounting
- In Accounting settings, activate "Cash Basis"
- Create/modify a tax with "Tax Exigibility" set to "Based on Payment"
-
Set an account as "Cash Basis Transition Account"
-
Create an invoice:
- Customer: [any]
- Invoice Lines:
- [Price] 200.0
- [Taxes] The cash basis tax (e.g. 15%)
-
Confirm the invoice
-
Go to "Bank" journal
- Create a bank statement for a lower amount than the invoice (e.g. $200)
- Match the statement with the invoice from the "Match Existing Entries" tab
- Select the added line and click on "fully paid" link
=> A new line with the amount difference should be added - On the new line, select an expense account and the cash basis tax
=> A new tax line should be added (e.g. $3.91) - Validate
- Go to "Accounting / Reporting / Statement Reports / Tax Report"
Issue:
The amount of the Tax is equal to:
[Tax amount of the invoice] - 2 * [Tax amount of the difference line] = $30 - 2 * $3.91 = $22.18
which is not correct.
The tax amount of the difference line (coming from the bank reconciliation widget) is taken twice into account.
Cause:
A cash basis move is created for the tax line created in the bank reconciliation widget.
This move is using the same tax account as debit and credit account and is directly reversed using the same account.
No cash basis move should be created for that line because the tax line is added while reconciling a bank statement, which means the tax should have been received.
Solution:
Do not create a cash basis move for journal entries made in a bank journal.
Forward-Port-Of: #93735