From 3e83a0e6efc5adf65d885590f33827d8f573c2ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Fri, 25 Jul 2008 16:39:10 +0200 Subject: [PATCH] Don't put line without maturity date in lines to pay --- invoice.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/invoice.py b/invoice.py index 6df257f45e..eabbb182d8 100644 --- a/invoice.py +++ b/invoice.py @@ -470,7 +470,8 @@ class Invoice(OSV): lines = [] if invoice.move: for line in invoice.move.lines: - if line.account.id == invoice.account.id: + if line.account.id == invoice.account.id \ + and line.maturity_date: lines.append(line) lines.sort(lambda x, y: cmp(x.maturity_date, y.maturity_date)) res[invoice.id] = [x.id for x in lines]