summaryrefslogtreecommitdiff
path: root/addons/account_check_printing/models
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2019-04-05 10:50:56 +0200
committerChristophe Simonis <chs@odoo.com>2019-04-05 10:50:56 +0200
commitf2be461f0906ed47306da58c31240014b6239d80 (patch)
tree6084c152dd56f691aa75c2e4580ffaf53b8257ba /addons/account_check_printing/models
parentf391b8c5a55bdc512d70cb8b3e61f23903abb5ed (diff)
parentf2d0995362ccdae88ba64597ea6f0feca3eab618 (diff)
[MERGE] forward port branch saas-12.1 up to f2d0995362c
Diffstat (limited to 'addons/account_check_printing/models')
-rw-r--r--addons/account_check_printing/models/account_payment.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/account_check_printing/models/account_payment.py b/addons/account_check_printing/models/account_payment.py
index d2fd855ab07..22b93d30ab2 100644
--- a/addons/account_check_printing/models/account_payment.py
+++ b/addons/account_check_printing/models/account_payment.py
@@ -152,12 +152,12 @@ class AccountPayment(models.Model):
""" The stub is the summary of paid invoices. It may spill on several pages, in which case only the check on
first page is valid. This function returns a list of stub lines per page.
"""
- if len(self.invoice_ids) == 0:
+ if len(self.reconciled_invoice_ids) == 0:
return None
multi_stub = self.company_id.account_check_printing_multi_stub
- invoices = self.invoice_ids.sorted(key=lambda r: r.date_due)
+ invoices = self.reconciled_invoice_ids.sorted(key=lambda r: r.date_due)
debits = invoices.filtered(lambda r: r.type == 'in_invoice')
credits = invoices.filtered(lambda r: r.type == 'in_refund')