[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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user