odoo/enterprise#93735

Created by Bugfix, Anh Thao Pham (pta)
Merged at 9da30f7bca4e38602a5b7730c761e42db8f463fc

Statuses:

Linked pull requests
label
odoo-dev:16.0-opw-4663059-no_cash_basis_move_from_bank_move-pta
head
72be9d26f1d035379a8c5b29ea55c2d2a426a3f4
merged
9 months ago by Accounting, Antoine Boonen (aboo)
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