odoo/enterprise#94899

Created by fw-bot
Merged at ef895d5645ad92c7312a503e854f4c941424d835

Statuses:

Linked pull requests
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

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.

opw-4663059

Forward-Port-Of: #93735