When we name_search a res.user, we have a special hack so we will
firstly perform an exact search on the res.users login, if none is found
we will search over res.users name.
This is intended but in the case of negative search since 660cebb4faaeb,
for example operator='not ilike' and name='test' would probably just
return all user that do not have a login that is exactly test.
This is not the intended behavior, in this instance we should just
return user that do not have "test" in their names.
Without fix, added test would fail on:
- .name_search('vlad', operator='not ilike') => finding everyone but
user with exactly login vlad instead of user not containing vlad in
their name
- .name_search('', operator='not ilike') => find all users instead of
finding no user
- .name_search('lad', operator='not ilike') => find all users instead of
just finding "Nothing similar"
opw-2170517
closes #44040
closes odoo/odoo#44152
X-original-commit: 2378fb63c132c0bcf027785d478c0608b59a3409
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
47 lines
1.3 KiB
Python
47 lines
1.3 KiB
Python
# -*- coding: utf-8 -*-
|
|
# Part of Odoo. See LICENSE file for full copyright and licensing details.
|
|
|
|
from . import common
|
|
from . import test_acl
|
|
from . import test_api
|
|
from . import test_base
|
|
from . import test_basecase
|
|
from . import test_cache
|
|
from . import test_db_cursor
|
|
from . import test_expression
|
|
from . import test_float
|
|
from . import test_func
|
|
from . import test_http_case
|
|
from . import test_image
|
|
from . import test_ir_actions
|
|
from . import test_ir_attachment
|
|
from . import test_ir_http
|
|
from . import test_ir_filters
|
|
from . import test_ir_model
|
|
from . import test_ir_sequence
|
|
from . import test_ir_sequence_date_range
|
|
from . import test_ir_default
|
|
from . import test_mail
|
|
from . import test_menu
|
|
from . import test_mimetypes
|
|
from . import test_misc
|
|
from . import test_orm
|
|
from . import test_ormcache
|
|
from . import test_osv
|
|
from . import test_qweb
|
|
from . import test_res_config
|
|
from . import test_res_lang
|
|
from . import test_search
|
|
from . import test_translate
|
|
#import test_uninstall # loop
|
|
from . import test_user_has_group
|
|
from . import test_views
|
|
from . import test_xmlrpc
|
|
from . import test_res_partner
|
|
from . import test_res_partner_bank
|
|
from . import test_res_users
|
|
from . import test_reports
|
|
from . import test_tests_tags
|
|
from . import test_base_document_layout
|
|
from . import test_form_create
|