Skip to content

Commit

Permalink
[FIX] account_check_report: bug
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronHForgeFlow committed Apr 15, 2024
1 parent 78fa16e commit def7142
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions account_check_report/models/account_payment.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class AccountPayment(models.Model):
def _compute_stat_buttons_from_reconciliation(self):
res = super()._compute_stat_buttons_from_reconciliation()
for rec in self:
if self.payment_type == "outbound":
if rec.payment_type == "outbound":
open_action = rec.button_open_bills()
result_domain = open_action.get("domain", False)
if not result_domain:
Expand Down Expand Up @@ -62,8 +62,10 @@ def get_direct_refunds(self):
return invoice_ids

def get_direct_refunds_domain(self):
invoice_ids = self.get_direct_refunds()
return [("id", "in", invoice_ids.ids)]
invoices = self.get_direct_refunds()
if invoices:
return [("id", "in", invoices.ids)]
return []

def button_open_invoices(self):
res = super(AccountPayment, self).button_open_invoices()
Expand Down

0 comments on commit def7142

Please sign in to comment.