Remove call to mx.DateTime.strptime for version 3.0

This commit is contained in:
Cédric Krier committed 2008-06-14 12:32:23 +02:00
1 parent f4b0a4c85c
commit e12a050590
1 file changed
+3 -2
+3 -2
View File
@@ -3,6 +3,7 @@
from trytond.osv import fields, OSV, ExceptORM
import datetime
import mx.DateTime
import time
from decimal import Decimal
from trytond.netsvc import LocalService
from trytond.report import Report
@@ -116,10 +117,10 @@ class PaymentTermLineDelay(OSV):
def get_date(self, cursor, user, line, date, context=None):
if line.delay == 'net_days':
return mx.DateTime.strptime(str(date), '%Y-%m-%d') + \
return mx.DateTime.mktime(time.strptime(str(date), '%Y-%m-%d')) + \
mx.DateTime.RelativeDateTime(days=line.days)
elif line.delay == 'end_month':
return mx.DateTime.strptime(str(date), '%Y-%m-%d') + \
return mx.DateTime.mktime(time.strptime(str(date), '%Y-%m-%d')) + \
mx.DateTime.RelativeDateTime(days=line.days) + \
mx.DateTime.RelativeDateTime(day=-1)
return None