'Create a channel and add the current partner, broadcast it (to make the user directly
listen to it when polling)
:param name : the name of the channel to create
:param privacy : privacy of the channel. Should be \'public\' or \'private\'.
:return dict : channel header'

@api.model
def channel_create(self, name, privacy='public'):

    new_channel = self.create({'name': name, 'public': privacy, 'email_send': False, 'channel_partner_ids': [(4, self.env.user.partner_id.id)]})
    channel_info = new_channel.channel_info('creation')[0]
    notification = (_('<div    class="o_mail_notification">created    <a    href="#"    class="o_channel_redirect"    data-oe-id="%s">#%s</a></div>') % (new_channel.id, new_channel.name))
    new_channel.message_post(body=notification, message_type='notification', subtype='mail.mt_comment')
    self.env['bus.bus'].sendone((self._cr.dbname, 'res.partner', self.env.user.partner_id.id), channel_info)
    return channel_info
