[FIX] Don't break when _get_writeoff_suggestion_query is called

This commit is contained in:
mreficent
2020-09-21 10:21:24 +02:00
parent 0b3b4e95b5
commit 34fc6be367

View File

@@ -11,5 +11,7 @@ class AccountReconcileModel(models.Model):
def _apply_conditions(self, query, params):
query, params = super(
AccountReconcileModel, self)._apply_conditions(query, params)
query += ' AND account.exclude_bank_reconcile IS NOT TRUE'
rule = self.env["account.reconcile.model"].browse(params[1])
if rule.rule_type == "invoice_matching":
query += ' AND account.exclude_bank_reconcile IS NOT TRUE'
return query, params