[IMP] base: add test for many2one domain expression with 'not like' operator
task-2671476 Part-of: odoo/odoo#78948
This commit is contained in:
committed by
Raphael Collet
parent
3d10c7c708
commit
d31234cc5e
@@ -1418,6 +1418,23 @@ class TestMany2one(TransactionCase):
|
||||
''']):
|
||||
self.Partner.search([('company_id', 'like', self.company.name)])
|
||||
|
||||
with self.assertQueries([
|
||||
'''
|
||||
SELECT "res_company".id
|
||||
FROM "res_company"
|
||||
WHERE (("res_company"."name"::text not like %s)
|
||||
OR "res_company"."name" IS NULL)
|
||||
ORDER BY "res_company"."sequence" ,"res_company"."name"
|
||||
''',
|
||||
'''
|
||||
SELECT "res_partner".id
|
||||
FROM "res_partner"
|
||||
WHERE (("res_partner"."company_id" IN (%s)) OR "res_partner"."company_id" IS NULL)
|
||||
ORDER BY "res_partner"."display_name"
|
||||
'''
|
||||
]):
|
||||
self.Partner.search([('company_id', 'not like', "blablabla")])
|
||||
|
||||
|
||||
class TestOne2many(TransactionCase):
|
||||
def setUp(self):
|
||||
|
||||
Reference in New Issue
Block a user