'find the partner corresponding to a token, and possibly check its validity
:param token: the token to resolve
:param check_validity: if True, also check validity
:param raise_exception: if True, raise exception instead of returning False
:return: partner (browse record) or False (if raise_exception is False)'

@api.model
def _signup_retrieve_partner(self, token, check_validity=False, raise_exception=False):

    partner = self.search([('signup_token', '=', token)], limit=1)
    if (not partner):
        if raise_exception:
            raise SignupError(("Signup    token    '%s'    is    not    valid" % token))
        return False
    if (check_validity and (not partner.signup_valid)):
        if raise_exception:
            raise SignupError(("Signup    token    '%s'    is    no    longer    valid" % token))
        return False
    return partner
