check_deposit: filter source moves on state=posted

This commit is contained in:
Alexis de Lattre
2022-10-06 20:11:19 +02:00
parent 0e3ee215c0
commit 68df263244
2 changed files with 2 additions and 0 deletions

View File

@@ -335,6 +335,7 @@ class AccountCheckDeposit(models.Model):
("debit", ">", 0),
("check_deposit_id", "=", False),
("currency_id", "=", self.currency_id.id),
("parent_state", "=", "posted"),
]
)
if all_pending_checks:

View File

@@ -81,6 +81,7 @@
('currency_id', '=', currency_id),
('account_id', '=', journal_default_account_id),
('company_id', '=', company_id),
('parent_state', '=', 'posted'),
]"
context="{'currency': currency_id,
'journal_id': journal_id}"