diff --git a/addons/account_followup/account_followup.py b/addons/account_followup/account_followup.py index 9cedbebf974..e7778cb76c2 100644 --- a/addons/account_followup/account_followup.py +++ b/addons/account_followup/account_followup.py @@ -315,6 +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)), ], 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 25103498b4b..cd868629de5 100644 --- a/addons/account_followup/report/account_followup_print.py +++ b/addons/account_followup/report/account_followup_print.py @@ -21,6 +21,7 @@ import time from collections import defaultdict +from openerp.osv import fields from openerp import pooler from openerp.report import report_sxw @@ -57,6 +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)), ]) # lines_per_currency = {currency: [line data, ...], ...}