[FIX] calendar: avoid recomputing fields at unlink

As unlinking calendar events leads to separate flows depending on the
event being recurrent some fields are recomputed in cache even if records
have already been deleted. This leads to issues when computing recurrence
and accessing some event data. Let us therefore avoid recomputing fields
when unlinking events.
This commit is contained in:
Thibault Delavallée
2017-09-07 17:54:02 +02:00
parent 0ff5acee96
commit fc4251fef9
+1 -1
View File
@@ -1524,7 +1524,7 @@ class Meeting(models.Model):
partner_ids = events.mapped('partner_ids').ids
records_to_exclude = self.env['calendar.event']
records_to_unlink = self.env['calendar.event']
records_to_unlink = self.env['calendar.event'].with_context(recompute=False)
for meeting in self:
if can_be_deleted and not is_calendar_id(meeting.id): # if ID REAL