Skip to content
Snippets Groups Projects
Commit 3aab5890 authored by Andrea Grazioso (agr-odoo)'s avatar Andrea Grazioso (agr-odoo)
Browse files

[FIX] account: show payments posted at bank reconciliaton


Accounting > Configuration > Journal > Create
Under Journal Entry Tab Fill name, type "Bank", short code
Under Advanced Settings tab set Post at "bank reconciliation"
Save

Go to Accounting > Customer Invoices > Create
Add Customer, and SO line with label and price, remove Tax Line.
Post and Register payment on the created journal.

Go to Accounting > <Created Journal> > Create
Add reference, label, partner as in soline, amount as in so line.
Save and Reconcile.

There will be no entry to reconcile with. This is because the domain
used by the reconciliation widget does not take into account the
possibility to have a draft move_id, so the line which can be reconciled
because the line is automatically posted on reconciliation is filtered

Rearranging the domain to take into account this possibility

closes odoo/odoo#40786

Signed-off-by: default avatarNicolas Martinelli (nim) <nim@odoo.com>
parent cddf29e7
Branches
Tags
No related merge requests found
......@@ -596,7 +596,16 @@ class AccountReconciliation(models.AbstractModel):
])
# filter on account.move.line having the same company as the statement line
domain = expression.AND([domain, [('company_id', '=', st_line.company_id.id)]])
domain = expression.AND([domain, [('move_id.state', 'not in', ['draft', 'cancel'])]])
# take only moves in valid state. Draft is accepted only when "Post At" is set
# to "Bank Reconciliation" in the associated journal
domain_post_at = [
'|', '&',
('move_id.state', '=', 'draft'),
('journal_id.post_at', '=', 'bank_rec'),
('move_id.state', 'not in', ['draft', 'cancel']),
]
domain = expression.AND([domain, domain_post_at])
if st_line.company_id.account_bank_reconciliation_start:
domain = expression.AND([domain, [('date', '>=', st_line.company_id.account_bank_reconciliation_start)]])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment