(self, vals)
return write_res
Automatically subscribe new users to linked slide channels
Automatically subscribe new users to linked slide channels
Automatically subscribe new users to linked slide channels
def write(self, vals):
        """ Automatically subscribe new users to linked slide channels """
        write_res = super(UserGroup, self).write(vals)
        if vals.get('users'):
            # TDE FIXME: maybe directly check users and subscribe them
            self.env['slide.channel'].sudo().search([('enroll_group_ids', 'in', self._ids)])._add_groups_members()
        return write_res
def write ( self , vals ) : write_res = super ( UserGroup , self ) . write ( vals ) if vals . get ( 'users' ) : # TDE FIXME: maybe directly check users and subscribe them self . env [ 'slide.channel' ] . sudo ( ) . search ( [ ( 'enroll_group_ids' , 'in' , self . _ids ) ] ) . _add_groups_members ( ) return write_res