From f2f4391e8bc0a135f0b1c4afe93e272cb27407b6 Mon Sep 17 00:00:00 2001 From: Denis Ledoux Date: Wed, 29 Apr 2015 17:39:58 +0200 Subject: [PATCH] [FIX] account_followup: partial overdue payments This is related to rev. ab9f02cdee91d9caa873f190a40bbb17e6cbc7b4 The above rev. take care to exclude payments that are not yet due; meaning the ones due in the future, by checking the maturity date. Problem: Payments (e.g. move lines from bank statements) do not have a maturity date. Only move lines that actually have a maturity date, in the future, must be excluded, not the one that do not have a maturity date. opw-633930 --- addons/account_followup/account_followup.py | 2 +- addons/account_followup/report/account_followup_print.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/account_followup/account_followup.py b/addons/account_followup/account_followup.py index e7778cb76c2..c48bab0f256 100644 --- a/addons/account_followup/account_followup.py +++ b/addons/account_followup/account_followup.py @@ -315,7 +315,7 @@ class res_partner(osv.osv): ('reconcile_id', '=', False), ('state', '!=', 'draft'), ('company_id', '=', company_id), - ('date_maturity', '<=', fields.date.context_today(self,cr,uid)), + '|', ('date_maturity', '=', False), ('date_maturity', '<=', fields.date.context_today(self, cr, uid)), ], context=context): raise osv.except_osv(_('Error!'),_("The partner does not have any accounting entries to print in the overdue report for the current company.")) self.message_post(cr, uid, [ids[0]], body=_('Printed overdue payments report'), context=context) diff --git a/addons/account_followup/report/account_followup_print.py b/addons/account_followup/report/account_followup_print.py index cd868629de5..bfec7f2f52d 100644 --- a/addons/account_followup/report/account_followup_print.py +++ b/addons/account_followup/report/account_followup_print.py @@ -58,7 +58,7 @@ class report_rappel(report_sxw.rml_parse): ('reconcile_id', '=', False), ('state', '!=', 'draft'), ('company_id', '=', company_id), - ('date_maturity', '<=', fields.date.context_today(self,self.cr,self.uid)), + '|', ('date_maturity', '=', False), ('date_maturity', '<=', fields.date.context_today(self, self.cr, self.uid)), ]) # lines_per_currency = {currency: [line data, ...], ...}