Set date to line madurity date by default

This commit is contained in:
Sergi Almacellas Abellana 2014-01-10 11:21:23 +01:00
parent 0701777e66
commit c357dba9fc
1 changed files with 2 additions and 0 deletions

View File

@ -140,6 +140,7 @@ class PayLine(Wizard):
def get_payment(self, line):
pool = Pool()
Payment = pool.get('account.payment')
Date = pool.get('ir.date')
if (line.debit > 0) or (line.credit < 0):
kind = 'receivable'
@ -152,6 +153,7 @@ class PayLine(Wizard):
kind=kind,
amount=line.payment_amount,
line=line,
date=line.maturity_date or Date.today(),
description=line.description,
)