Files
odoo_source/addons/auth_signup/models/res_config_settings.py
T
Florian Charlier b5f3433adc [IMP] auth_signup,portal,web: welcome external users w/o portal
When portal is not installed and `auth_signup.invitation_scope` is "b2c",
visitors can create an account, leading to a blank page. Still, accounts can be
required for several use cases in apps that do not require portal (such as
survey).

We here add a landing page for users that created an account but have no
requested redirections and cannot be redirected to a customer portal either.

auth_signup_uninvited is also updated in model to be consistent with config
data.

Tests are added to check this behavior.

Task-2762102

Part-of: odoo/odoo#85703
2022-06-14 09:35:57 +02:00

25 lines
846 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models
class ResConfigSettings(models.TransientModel):
_inherit = 'res.config.settings'
auth_signup_reset_password = fields.Boolean(
string='Enable password reset from Login page',
config_parameter='auth_signup.reset_password')
auth_signup_uninvited = fields.Selection(
selection=[
('b2b', 'On invitation'),
('b2c', 'Free sign up'),
],
string='Customer Account',
default='b2c',
config_parameter='auth_signup.invitation_scope')
auth_signup_template_user_id = fields.Many2one(
'res.users',
string='Template user for new users created through signup',
config_parameter='base.template_portal_user_id')