When you try to create two users with the same login, the shown error message is the Postgresql integrity error instead of a nice (translated) validation error. This happens sincebf88f3ewhich changed the way error messages are translated. The reason is the manually created unique index `res_users_login_key_unique_website_index`. The error handling and translation mechanisms don't know it exists. The index was created for performance reasons in commitb5a12b4where the original python constraint was replaced with this custom SQL index. In this commit, the python constraint is re-introduced to remove the index hack, but the implementation now uses a single SQL query, which should be quite fast. closes odoo/odoo#38737 X-original-commit: 817a811ec98b0c313b12e6464b5e98ca432cb3fc Signed-off-by: Christophe Simonis <chs@odoo.com>
18 lines
509 B
Python
18 lines
509 B
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from . import test_base_url
|
|
from . import test_converter
|
|
from . import test_crawl
|
|
from . import test_get_current_website
|
|
from . import test_lang_url
|
|
from . import test_menu
|
|
from . import test_page
|
|
from . import test_qweb
|
|
from . import test_res_users
|
|
from . import test_ui
|
|
from . import test_views
|
|
from . import test_website_favicon
|
|
from . import test_website_reset_password
|
|
from . import test_website_visitor
|