Skip to content

Commit

Permalink
Merge PR #443 into 14.0
Browse files Browse the repository at this point in the history
Signed-off-by pedrobaeza
  • Loading branch information
OCA-git-bot committed Mar 11, 2022
2 parents 6f643c7 + 78e9e3a commit fd69d6a
Showing 1 changed file with 13 additions and 17 deletions.
30 changes: 13 additions & 17 deletions account_reconciliation_widget/models/reconciliation_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -769,15 +769,25 @@ def _domain_move_lines_for_reconciliation(
excluded_ids.extend(to_check_excluded)

domain_reconciliation = [
"&",
"&",
"&",
("statement_line_id", "=", False),
("account_id", "in", aml_accounts),
("payment_id", "<>", False),
("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
domain_matching = [
"&",
Expand Down Expand Up @@ -830,20 +840,6 @@ def _domain_move_lines_for_reconciliation(
# filter on account.move.line having the same company as the statement
# line
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

@api.model
Expand Down

0 comments on commit fd69d6a

Please sign in to comment.