Add rec_name searcher for party relations
issue5972 review31621002
This commit is contained in:
1 parent
0320d8b205
commit
c911b5d265
1 file changed
+12
@@ -28,6 +28,18 @@ class PartyRelation(ModelSQL):
|
||||
type = fields.Many2One('party.relation.type', 'Type', required=True,
|
||||
select=True)
|
||||
|
||||
@classmethod
|
||||
def search_rec_name(cls, name, clause):
|
||||
if clause[1].startswith('!') or clause[1].startswith('not '):
|
||||
bool_op = 'AND'
|
||||
else:
|
||||
bool_op = 'OR'
|
||||
return [bool_op,
|
||||
('from_',) + tuple(clause[1:]),
|
||||
('to',) + tuple(clause[1:]),
|
||||
('type',) + tuple(clause[1:]),
|
||||
]
|
||||
|
||||
|
||||
class PartyRelationAll(PartyRelation, ModelView):
|
||||
'Party Relation'
|
||||
|
||||
Reference in new issue
Block a user