'create a new user from the template user'

@api.model
def _signup_create_user(self, values):

    IrConfigParam = self.env['ir.config_parameter']
    template_user_id = literal_eval(IrConfigParam.get_param('auth_signup.template_user_id', 'False'))
    template_user = self.browse(template_user_id)
    assert template_user.exists(), 'Signup:    invalid    template    user'
    if ('partner_id' not in values):
        if (not literal_eval(IrConfigParam.get_param('auth_signup.allow_uninvited', 'False'))):
            raise SignupError('Signup    is    not    allowed    for    uninvited    users')
    assert values.get('login'), 'Signup:    no    login    given    for    new    user'
    assert (values.get('partner_id') or values.get('name')), 'Signup:    no    name    or    partner    given    for    new    user'
    values['active'] = True
    try:
        with self.env.cr.savepoint():
            return template_user.with_context(no_reset_password=True).copy(values)
    except Exception as e:
        raise SignupError(ustr(e))
