Switch from OR-ed to AND-ed domain for search_rec_name of location
issue8054
This commit is contained in:
1 parent
0f314917d8
commit
81bf997722
1 file changed
+5
-1
+5
-1
@@ -297,7 +297,11 @@ class Location(DeactivableMixin, tree(), ModelSQL, ModelView):
|
||||
|
||||
@classmethod
|
||||
def search_rec_name(cls, name, clause):
|
||||
return ['OR',
|
||||
if clause[1].startswith('!') or clause[1].startswith('not '):
|
||||
bool_op = 'AND'
|
||||
else:
|
||||
bool_op = 'OR'
|
||||
return [bool_op,
|
||||
(cls._rec_name,) + tuple(clause[1:]),
|
||||
('code',) + tuple(clause[1:]),
|
||||
]
|
||||
|
||||
Reference in new issue
Block a user