[FIX] calendar: check self is exists or not

When self does not exist (NewId origin) at that time if user tries to access
the meetings of  `res.partner` which will raise an error.

Error : KeyError: <NewId origin=3128>

On the` _compute_meeting` method self is referenced to get the meeting id when
the self does not exist. So, it will lead to the above traceback.

sentry-4362827298

closes odoo/odoo#132409

X-original-commit: 88bbb28aabae524413b00707028e56e965a4af29
Signed-off-by: Achraf Ben Azzouz (abz) <abz@odoo.com>
This commit is contained in:
Archana Vaghasiya
2023-08-21 12:39:42 +02:00
parent a37214d7ba
commit d64e69e49c
+1 -1
View File
@@ -52,7 +52,7 @@ class Partner(models.Model):
if partner in self:
meetings[partner.id] |= meetings[p.id]
partner = partner.parent_id
return {p.id: list(meetings[p.id]) for p in self}
return {p_id: list(meetings[p_id]) for p_id in self.ids}
return {}
def get_attendee_detail(self, meeting_ids):