Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Calendar
Entity: res.users
Compute Method: _compute_calendar_ids
| Inputs | Method | Outputs |
|---|---|---|
|
+ calendar_user_records = self.env['calendar.user'].sudo().search([('user_id', 'in', self.ids)]) + for user in self: + user.calendar_ids = calendar_user_records.filtered(lambda l: l.user_id.id == user.id).calendar_id + user.owned_calendar_ids = calendar_user_records.filtered( + lambda l: l.user_id.id == user.id and l.access_role == 'owner').calendar_id + user.writable_calendar_ids = calendar_user_records.filtered( + lambda l: l.user_id.id == user.id and l.access_role in ('owner', 'writer')).calendar_id |
|
