diff --git a/addons/account/views/report_payment_receipt_templates.xml b/addons/account/views/report_payment_receipt_templates.xml index 626cff36fe2..871ae39479f 100644 --- a/addons/account/views/report_payment_receipt_templates.xml +++ b/addons/account/views/report_payment_receipt_templates.xml @@ -42,7 +42,7 @@ - + diff --git a/addons/account_check_printing/models/account_payment.py b/addons/account_check_printing/models/account_payment.py index cfba4270da8..882cf796db0 100644 --- a/addons/account_check_printing/models/account_payment.py +++ b/addons/account_check_printing/models/account_payment.py @@ -151,12 +151,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')