account: fix overdue payment to check the maturity date

bzr revid: ced-1f58d3743b46e67d9544bbe5fa2286e871832030
This commit is contained in:
ced
2007-07-10 15:25:13 +00:00
parent bf646ec861
commit 38cfe6927a
+2 -1
View File
@@ -54,7 +54,8 @@ class report_rappel(report_sxw.rml_parse):
part = pooler.get_pool(self.cr.dbname).get('res.partner')
acc = partner.property_account_receivable[0]
moveline_obj = pooler.get_pool(self.cr.dbname).get('account.move.line')
movelines = moveline_obj.search(self.cr, self.uid, [('partner_id','=',partner.id), ('account_id','=',acc), ('state','=','valid')])
movelines = moveline_obj.search(self.cr, self.uid, [('partner_id','=',partner.id), ('account_id','=',acc), ('state','=','valid'), ('date_maturity', '=', False)])
movelines += moveline_obj.search(self.cr, self.uid, [('partner_id','=',partner.id), ('account_id','=',acc), ('state','=','valid'), ('date_maturity', '<=', time.strftime('%Y-%m-%d'))])
movelines = moveline_obj.read(self.cr, self.uid, movelines)
return movelines