[FIX] account_followup: overdue payments must exclude payments not yet due.

Before this revision, the overdue payments report contained all payments due,
including the ones in the future, that are not actually due yet.

opw-628874
This commit is contained in:
Goffin Simon 2015-03-04 09:37:19 +01:00
parent f18304c0cd
commit ab9f02cdee
2 changed files with 3 additions and 0 deletions

View File

@ -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)

View File

@ -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, ...], ...}