[IMP]event:checked whether date is in string format or not

bzr revid: ssu@tinyerp.com-20121005051501-4koyhx8gu1s4x3at
This commit is contained in:
Saurang Suthar 2012-10-05 10:45:01 +05:30
parent 83443995e1
commit 7186cfac68
1 changed files with 1 additions and 1 deletions

View File

@ -292,7 +292,7 @@ class event_event(osv.osv):
def onchange_start_date(self, cr, uid, ids, date_end=False, date_begin=False, context=None):
value = {}
if date_begin:
if type(date_begin) is str:
date_begin = datetime.strptime(date_begin, "%Y-%m-%d %H:%M:%S")
date_end = date_begin + timedelta(hours=1.00)
return {'value': {'date_end':date_end.strftime("%Y-%m-%d %H:%M:%S")}}