[FIX] account: display partial payments in overdue report
Before that, partial payments on open invoices were ignored by the query, due to the fact we used checked "reconciled=false" instead of "full_reconcile_id is not null".
This commit is contained in:
@@ -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') 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),))))
|
||||
"WHERE l.partner_id IN %s AND at.type IN ('receivable', 'payable') AND l.full_reconcile_id IS NULL 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
|
||||
|
||||
Reference in New Issue
Block a user