Files
odoo_source/addons/website/tests/test_auth_signup_uninvited.py
T
Kamen Zhekov db3acb5ef9 [FIX] website: correctly set and sync custom account setting
A while back, the behavior of this setting was changed from a
related field to a computed as a fix to various issues with: cb9f48d
The setting's value synchronization with what is displayed on the
setting's page is broken, since its behavior changed with commit:
2ccc735 . It resets to its default value for the default website when
editing a secondary one and is not only confusing but breaks the
setting in some scenarios.

When changing the auth_signup_uninvited setting, the changes
are correctly reflected and not reset to default upon changing
the website we are currently editing.

task-2612686

closes odoo/odoo#76538

X-original-commit: 6e7a0664850ccbc30a7a8a3ced22f05347bc6f9e
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2021-09-15 10:16:47 +00:00

14 lines
470 B
Python

# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.tests import common, tagged
@tagged('-at_install', 'post_install')
class TestAuthSignupUninvited(common.TransactionCase):
def test_01_auth_signup_uninvited(self):
self.env['website'].browse(1).auth_signup_uninvited = 'b2c'
config = self.env['res.config.settings'].create({})
self.assertEqual(config.auth_signup_uninvited, 'b2c')