summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Ledoux <dle@odoo.com>2015-04-29 17:39:58 +0200
committerDenis Ledoux <dle@odoo.com>2015-04-29 17:45:02 +0200
commitf2f4391e8bc0a135f0b1c4afe93e272cb27407b6 (patch)
tree063e36687f384c86b088f3d6912b34b07214931f
parentfa01054ae0a82ccea7c986f6b0c27292dcdc9c23 (diff)
[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
-rw-r--r--addons/account_followup/account_followup.py2
-rw-r--r--addons/account_followup/report/account_followup_print.py2
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, ...], ...}