'Action to display the rating relative to the channel, so all rating of the
sessions of the current channel
:returns : the ir.action \'action_view_rating\' with the correct domain'

@api.multi
def action_view_rating(self):

    self.ensure_one()
    action = self.env['ir.actions.act_window'].for_xml_id('rating', 'action_view_rating')
    action['domain'] = [('res_id', 'in', [s.id for s in self.channel_ids]), ('res_model', '=', 'mail.channel')]
    return action
