[FIX] calendar: browse record using IrRules
Install CRM (we need the "Hide Private Message" record rule defined by
that module), create a meeting as of today, set a reminder of one day,
invite another user (Demo) as attendee, save. Edit, go to the options,
change the "Show time as" to "free", save => access error due to the
said record rule.
Using a search instead of browse ensures record unavailable due to a
record rule are filtered.
Same as 54e970e
opw-1974599
closes odoo/odoo#32987
Signed-off-by: Julien Castiaux <Julien00859@users.noreply.github.com>
This commit is contained in:
@@ -409,9 +409,8 @@ class AlarmManager(models.AbstractModel):
|
||||
|
||||
all_meetings = self.get_next_potential_limit_alarm('notification', partner_id=partner.id)
|
||||
time_limit = 3600 * 24 # return alarms of the next 24 hours
|
||||
for event_id in all_meetings:
|
||||
max_delta = all_meetings[event_id]['max_duration']
|
||||
meeting = self.env['calendar.event'].browse(event_id)
|
||||
for meeting in self.env['calendar.event'].search([('id', 'in', list(all_meetings))]): # cannot browse
|
||||
max_delta = all_meetings[meeting.id]['max_duration']
|
||||
if meeting.recurrency:
|
||||
b_found = False
|
||||
last_found = False
|
||||
|
||||
Reference in New Issue
Block a user