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(
            ['website_slides.mail_activity_data_access_request'],
            additional_domain=[('request_partner_id', '=', self.env.user.partner_id.id)]
        ).mapped('res_id')
for channel in self:
            channel.has_requested_access = channel.id in requested_cids

Back to entity