Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Discuss

Entity: mail.scheduled.message

Compute Method: _compute_res_access

Inputs Method Outputs
assert self.env.su
if not self or not self.browse().sudo(False).has_access('read'):
            self.res_access = False
            return
model_docid_actids = defaultdict(lambda: defaultdict(list))
for mail in self:
            if mail.model and mail.res_id:
                model_docid_actids[mail.model][mail.res_id].append(mail.id)
allowed = _find_allowed_doc_ids(self.env(su=False), model_docid_actids, 'write')
for activity in self:
            activity.res_access = activity.id in allowed

Back to entity