[IMP]event:improved code for onchange start date

bzr revid: ssu@tinyerp.com-20121004051952-j1jgw2lys5y20gtp
This commit is contained in:
Saurang Suthar 2012-10-04 10:49:52 +05:30
parent 6ce035da7c
commit 7c3394a35d
1 changed files with 1 additions and 2 deletions

View File

@ -293,8 +293,7 @@ class event_event(osv.osv):
value = {}
if date_begin:
start = datetime.strptime(date_begin, "%Y-%m-%d %H:%M:%S")
if not date_end or date_end:
date_end = start + timedelta(hours=1.00)
date_end = start + timedelta(hours=1.00)
return {'value': {'date_end':date_end.strftime("%Y-%m-%d %H:%M:%S")}}
# ----------------------------------------