From e7a2a542b8529a183b1d4f33a223faed00ecd644 Mon Sep 17 00:00:00 2001 From: "Pedro M. Baeza" Date: Thu, 20 Apr 2017 17:50:36 +0200 Subject: [PATCH] [FIX] account: filter 'Due Payments' report on reconciled flag SQL that retrieves data for the "Due Payments" report doesn't include any filter for excluding AR/AP move lines already reconciled, which shouldn't be presented in this report. Courtesy of Pedro Baeza. Was PR #16440 --- addons/account/report/account_overdue_report.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/account/report/account_overdue_report.py b/addons/account/report/account_overdue_report.py index 6cfd79b1bbb..3aff4821c5e 100644 --- a/addons/account/report/account_overdue_report.py +++ b/addons/account/report/account_overdue_report.py @@ -25,7 +25,7 @@ class ReportOverdue(models.AbstractModel): "FROM account_move_line l " "JOIN account_account_type at ON (l.user_type_id = at.id) " "JOIN account_move m ON (l.move_id = m.id) " - "WHERE l.partner_id IN %s AND at.type IN ('receivable', 'payable') GROUP BY l.date, l.name, l.ref, l.date_maturity, l.partner_id, at.type, l.blocked, l.amount_currency, l.currency_id, l.move_id, m.name", (((fields.date.today(), ) + (tuple(partner_ids),)))) + "WHERE l.partner_id IN %s AND at.type IN ('receivable', 'payable') AND NOT l.reconciled GROUP BY l.date, l.name, l.ref, l.date_maturity, l.partner_id, at.type, l.blocked, l.amount_currency, l.currency_id, l.move_id, m.name", (((fields.date.today(), ) + (tuple(partner_ids),)))) for row in self.env.cr.dictfetchall(): res[row.pop('partner_id')].append(row) return res