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

Module: eLearning

Entity: slide.channel

Compute Method: _compute_has_requested_access

Inputs Method Outputs
  • id
requested_cids = self.sudo().activity_search(
            ['mail.mail_activity_data_todo'],
            additional_domain=[('request_partner_id', '=', self.env.user.partner_id.id)],
            only_automated=False,
        ).mapped('res_id')
for channel in self:
            channel.has_requested_access = channel.id in requested_cids

Back to entity