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_is_editable

View 17.0 View 19.0
Inputs Method Outputs
  • channel_type
  • create_uid
  • create_uid.id
  • is_member
for channel in self:
-             if channel.channel_type == 'channel':
-                 channel.is_editable = self.env.user._is_admin() or channel.create_uid.id == self.env.user.id
-             elif channel.channel_type == 'group':
-                 channel.is_editable = channel.is_member and not self.env.user.share
-             else:
-                 channel.is_editable = False
+             channel.is_editable = channel.has_access("write")
  • is_editable

Back to entity