Don't raise exception for empty payment line with no remainder

This commit is contained in:
Cédric Krier committed 2008-05-23 11:05:30 +02:00
1 parent a8eff8949e
commit 81796aafe3
1 file changed
+4 -1
+4 -1
View File
@@ -59,7 +59,10 @@ class PaymentTerm(OSV):
context)
value_date = delay_obj.get_date(cursor, user, line, date, context)
if not value or not value_date:
raise ExceptORM('Error', 'Invalid payment term line!')
if not remainder:
raise ExceptORM('Error', 'Invalid payment term line!')
else:
continue
res.append((value_date, value))
remainder -= value
if not currency_obj.is_zero(cursor, user, currency, remainder):