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: discuss.channel

Compute Method: _compute_group_public_id

View 19.0
Inputs Method Outputs
  • parent_channel_id
  • parent_channel_id.group_public_id
  • group_public_id
- channels = self.filtered(lambda channel: channel.channel_type == "channel")
- for channel in channels:
-             if channel.parent_channel_id:
-                 channel.group_public_id = channel.parent_channel_id.group_public_id
-             elif not channel.group_public_id:
-                 channel.group_public_id = self.env.ref("base.group_user")
- (self - channels).group_public_id = None
  • group_public_id

Back to entity