[FIX] calendar: in multicompany user cannot access own calendar
Let's consider user1 and user2 allowed to access company1 and company2 In multicompany with shared partners unchecked in general settings, if one of two users sharing the same event tried to access the event when they are not in the same current company at this moment, an access error was raised. opw:1817475
This commit is contained in:
@@ -841,7 +841,7 @@ class Meeting(models.Model):
|
||||
|
||||
@api.multi
|
||||
def _compute_color_partner(self):
|
||||
for meeting in self:
|
||||
for meeting in self.sudo():
|
||||
meeting.color_partner_id = meeting.user_id.partner_id.id
|
||||
|
||||
@api.constrains('start_datetime', 'stop_datetime', 'start_date', 'stop_date')
|
||||
|
||||
Reference in New Issue
Block a user