'Unstar messages for the current partner.'

@api.model
def unstar_all(self):

    partner_id = self.env.user.partner_id.id
    starred_messages = self.search([('starred_partner_ids', 'in', partner_id)])
    starred_messages.write({'starred_partner_ids': [(3, partner_id)]})
    ids = [m.id for m in starred_messages]
    notification = {'type': 'toggle_star', 'message_ids': ids, 'starred': False}
    self.env['bus.bus'].sendone((self._cr.dbname, 'res.partner', self.env.user.partner_id.id), notification)
