[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 689d6d6829.
This commit is contained in:
committed by
Thibault Delavallée
parent
ca496c2198
commit
c6aea4afc2
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user