'create signup token for each user, and send their signup url by email'

@api.multi
def action_reset_password(self):

    create_mode = bool(self.env.context.get('create_user'))
    expiration = (False if create_mode else now(days=(+ 1)))
    self.mapped('partner_id').signup_prepare(signup_type='reset', expiration=expiration)
    template = False
    if create_mode:
        try:
            template = self.env.ref('auth_signup.set_password_email', raise_if_not_found=False)
        except ValueError:
            pass
    if (not template):
        template = self.env.ref('auth_signup.reset_password_email')
    assert (template._name == 'mail.template')
    for user in self:
        if (not user.email):
            raise UserError((_('Cannot    send    email:    user    %s    has    no    email    address.') % user.name))
        template.with_context(lang=user.lang).send_mail(user.id, force_send=True, raise_exception=True)
        _logger.info('Password    reset    email    sent    for    user    <%s>    to    <%s>', user.login, user.email)
