mirror of
https://github.com/OCA/account-reconcile.git
synced 2025-01-20 12:27:39 +02:00
[IMP] account_reconcile_widget: Allow to reconcile payment/debit orders from OCA/bank-payment
Payments without payment_id related aren't showed in statement reconciliation. With this change, we show them as blue lines, the same as other coming from Odoo core payments. TT34508
This commit is contained in:
@@ -769,15 +769,25 @@ class AccountReconciliation(models.AbstractModel):
|
|||||||
excluded_ids.extend(to_check_excluded)
|
excluded_ids.extend(to_check_excluded)
|
||||||
|
|
||||||
domain_reconciliation = [
|
domain_reconciliation = [
|
||||||
"&",
|
|
||||||
"&",
|
"&",
|
||||||
"&",
|
"&",
|
||||||
("statement_line_id", "=", False),
|
("statement_line_id", "=", False),
|
||||||
("account_id", "in", aml_accounts),
|
("account_id", "in", aml_accounts),
|
||||||
("payment_id", "<>", False),
|
|
||||||
("balance", "!=", 0.0),
|
("balance", "!=", 0.0),
|
||||||
]
|
]
|
||||||
|
if st_line.company_id.account_bank_reconciliation_start:
|
||||||
|
domain_reconciliation = expression.AND(
|
||||||
|
[
|
||||||
|
domain_reconciliation,
|
||||||
|
[
|
||||||
|
(
|
||||||
|
"date",
|
||||||
|
">=",
|
||||||
|
st_line.company_id.account_bank_reconciliation_start,
|
||||||
|
)
|
||||||
|
],
|
||||||
|
]
|
||||||
|
)
|
||||||
# default domain matching
|
# default domain matching
|
||||||
domain_matching = [
|
domain_matching = [
|
||||||
"&",
|
"&",
|
||||||
@@ -830,20 +840,6 @@ class AccountReconciliation(models.AbstractModel):
|
|||||||
# filter on account.move.line having the same company as the statement
|
# filter on account.move.line having the same company as the statement
|
||||||
# line
|
# line
|
||||||
domain = expression.AND([domain, [("company_id", "=", st_line.company_id.id)]])
|
domain = expression.AND([domain, [("company_id", "=", st_line.company_id.id)]])
|
||||||
|
|
||||||
if st_line.company_id.account_bank_reconciliation_start:
|
|
||||||
domain = expression.AND(
|
|
||||||
[
|
|
||||||
domain,
|
|
||||||
[
|
|
||||||
(
|
|
||||||
"date",
|
|
||||||
">=",
|
|
||||||
st_line.company_id.account_bank_reconciliation_start,
|
|
||||||
)
|
|
||||||
],
|
|
||||||
]
|
|
||||||
)
|
|
||||||
return domain
|
return domain
|
||||||
|
|
||||||
@api.model
|
@api.model
|
||||||
|
|||||||
Reference in New Issue
Block a user