Remove call to mx.DateTime.strptime for version 3.0

This commit is contained in:
Cédric Krier
2008-06-14 12:31:59 +02:00
parent 0231e94fc2
commit cc52f99a0e
+5 -4
View File
@@ -3,6 +3,7 @@
from trytond.osv import fields, OSV, ExceptORM
from trytond.wizard import Wizard, WizardOSV, ExceptWizard
import mx.DateTime
import time
import datetime
from decimal import Decimal
@@ -91,10 +92,10 @@ class FiscalYear(OSV):
'''
period_obj = self.pool.get('account.period')
for fiscalyear in self.browse(cursor, user, ids, context=context):
end_date = mx.DateTime.strptime(str(fiscalyear.end_date),
'%Y-%m-%d')
period_start_date = mx.DateTime.strptime(str(fiscalyear.start_date),
'%Y-%m-%d')
end_date = mx.DateTime.mktime(time.strptime(
str(fiscalyear.end_date), '%Y-%m-%d'))
period_start_date = mx.DateTime.mktime(time.strptime(
str(fiscalyear.start_date), '%Y-%m-%d'))
while period_start_date < end_date:
period_end_date = period_start_date + \
mx.DateTime.RelativeDateTime(months=interval)