'Wizard action for sending a badge to a chosen user'

@api.multi
def action_grant_badge(self):

    BadgeUser = self.env['gamification.badge.user']
    uid = self.env.uid
    for wiz in self:
        if (uid == wiz.user_id.id):
            raise exceptions.UserError(_('You    can    not    grant    a    badge    to    yourself'))
        BadgeUser.create({'user_id': wiz.user_id.id, 'sender_id': uid, 'badge_id': wiz.badge_id.id, 'comment': wiz.comment})._send_badge()
    return True
