[FIX] sync_google_calendar: Fixed recurrent forever option error.

bzr revid: uco@tinyerp.com-20110408054756-bbkvoodffgnsuuw1
This commit is contained in:
Ujjvala Collins (OpenERP)
2011-04-08 11:17:56 +05:30
parent 8f8b808818
commit e0480c8584
@@ -73,7 +73,9 @@ def _get_rules(self, datas):
if datas.get('INTERVAL'):
new_val['interval'] = datas.get('INTERVAL')
datas.pop('INTERVAL')
datas.pop('INTERVAL')
else:
new_val['interval'] = 1
if datas.get('BYMONTHDAY'):
new_val['day'] = datas.get('BYMONTHDAY')
@@ -117,10 +119,13 @@ def _get_repeat_status(self, str_google):
return status
def _get_repeat_dates(self, x):
if x[3].startswith('BY'):
zone_time = x[4].split('+')[-1:][0].split(':')[0][:4]
if len(x) > 4:
if x[3].startswith('BY'):
zone_time = x[4].split('+')[-1:][0].split(':')[0][:4]
else:
zone_time = x[3].split('+')[-1:][0].split(':')[0][:4]
else:
zone_time = x[3].split('+')[-1:][0].split(':')[0][:4]
zone_time = x[2].split('+')[-1:][0].split(':')[0][:4]
tz_format = zone_time[:2]+':'+zone_time[2:]
repeat_start = x[1].split('\n')[0].split(':')[1]
repeat_end = x[2].split('\n')[0].split(':')[1]