(self)
return super(ChannelUsersRelation, self).unlink()
Override unlink method :
        Remove attendee from a channel, then also remove slide.slide.partner related to.
Override unlink method :
        Remove attendee from a channel, then also remove slide.slide.partner related to.
Override unlink method : Remove attendee from a channel then also remove slide . slide . partner related to .
def unlink(self):
        """
        Override unlink method :
        Remove attendee from a channel, then also remove slide.slide.partner related to.
        """
        removed_slide_partner_domain = []
        for channel_partner in self:
            # find all slide link to the channel and the partner
            removed_slide_partner_domain = expression.OR([
                removed_slide_partner_domain,
                [('partner_id', '=', channel_partner.partner_id.id),
                 ('slide_id', 'in', channel_partner.channel_id.slide_ids.ids)]
            ])
        if removed_slide_partner_domain:
            self.env['slide.slide.partner'].search(removed_slide_partner_domain).unlink()
        return super(ChannelUsersRelation, self).unlink()
def unlink ( self ) : removed_slide_partner_domain = [ ] for channel_partner in self : # find all slide link to the channel and the partner removed_slide_partner_domain = expression . OR ( [ removed_slide_partner_domain , [ ( 'partner_id' , '=' , channel_partner . partner_id . id ) , ( 'slide_id' , 'in' , channel_partner . channel_id . slide_ids . ids ) ] ] ) if removed_slide_partner_domain : self . env [ 'slide.slide.partner' ] . search ( removed_slide_partner_domain ) . unlink ( ) return super ( ChannelUsersRelation , self ) . unlink ( )