Don't put line without maturity date in lines to pay

This commit is contained in:
Cédric Krier committed 2008-07-25 16:39:10 +02:00
1 parent 306df497a6
commit 3e83a0e6ef
1 file changed
+2 -1
+2 -1
View File
@@ -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]