'generate a new token for the partners with the given validity, if necessary
:param expiration: the expiration datetime of the token (string, optional)'

@api.multi
def signup_prepare(self, signup_type='signup', expiration=False):

    for partner in self:
        if (expiration or (not partner.signup_valid)):
            token = random_token()
            while self._signup_retrieve_partner(token):
                token = random_token()
            partner.write({'signup_token': token, 'signup_type': signup_type, 'signup_expiration': expiration})
    return True
