[FIX] calendar: recurrent event no longer working

Creating a recurrent event was no longer displaying
all recurring events in the calendar, only the base
event.

This is following odoo/odoo@9920f20e4c

closes odoo/odoo#35919

Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
This commit is contained in:
Denis Ledoux
2019-08-21 13:44:56 +00:00
parent 78619cbe7e
commit 47f488a564
+16 -1
View File
@@ -1656,7 +1656,22 @@ class Meeting(models.Model):
for calendar_id, real_id in select:
if not real_data.get(real_id):
continue
res = real_data[real_id]
res = real_data[real_id].copy()
ls = calendar_id2real_id(calendar_id, with_date=res and res.get('duration', 0) > 0 and res.get('duration') or 1)
if not isinstance(ls, (str, int)) and len(ls) >= 2:
res['start'] = ls[1]
res['stop'] = ls[2]
if res['allday']:
res['start_date'] = ls[1]
res['stop_date'] = ls[2]
else:
res['start_datetime'] = ls[1]
res['stop_datetime'] = ls[2]
if 'display_time' in fields:
res['display_time'] = self._get_display_time(ls[1], ls[2], res['duration'], res['allday'])
res['id'] = calendar_id
result.append(res)