[FIX] calendar: _get_recurrent_date_by_event

Let's create in google calendar a reccurent event with all day
set and a end date.

When synchronising google calendar with Odoo(by clicking on button
"Sync with Google"). It raised on error because the start date had
a time zone but not the end date(the UNTIL in the rrule).

Fine tuning of 20ed57f

opw:746549
This commit is contained in:
Goffin Simon
2017-06-09 01:04:21 +02:00
parent c047b1619c
commit 6edc0f7e6b
+1 -1
View File
@@ -557,7 +557,7 @@ class Meeting(models.Model):
if not event_date:
event_date = datetime.now()
if self.allday and self.rrule and 'Z' not in self.rrule:
if self.allday and self.rrule and 'UNTIL' in self.rrule and 'Z' not in self.rrule:
rset1 = rrule.rrulestr(str(self.rrule), dtstart=event_date.replace(tzinfo=None), forceset=True, ignoretz=True)
else:
# Convert the event date to saved timezone (or context tz) as it'll