From c6aea4afc262a26c1ec7db6c5b81cc47527a2227 Mon Sep 17 00:00:00 2001 From: Sanjay Jamod Date: Mon, 28 Aug 2017 15:43:56 +0530 Subject: [PATCH] [FIX] auth_signup: fix computation of default template user in settings Indeed we store an integer that is the ID of the user to copy when creating the portal user, not a boolean. We therefore have to evaluate the result instead of comparing it to a boolean. This was introduced at 689d6d68296ea32c2155dc1a61b593754ca3b968. --- addons/auth_signup/models/base_config_settings.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/auth_signup/models/base_config_settings.py b/addons/auth_signup/models/base_config_settings.py index 8ea0a8f2041..8e8999d91a7 100644 --- a/addons/auth_signup/models/base_config_settings.py +++ b/addons/auth_signup/models/base_config_settings.py @@ -1,6 +1,8 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. +from ast import literal_eval + from odoo import api, fields, models @@ -22,7 +24,7 @@ class BaseConfigSettings(models.TransientModel): res.update( auth_signup_reset_password=get_param('auth_signup.reset_password', 'False').lower() == 'true', auth_signup_uninvited='b2c' if get_param('auth_signup.allow_uninvited', 'False').lower() == 'true' else 'b2b', - auth_signup_template_user_id=get_param('auth_signup.template_user_id', 'False').lower() == 'true', + auth_signup_template_user_id=literal_eval(get_param('auth_signup.template_user_id', 'False')), ) return res