Add icon to global search
review3511002
This commit is contained in:
1 parent
47214f9b20
commit
ff06428807
1 file changed
+6
@@ -181,6 +181,12 @@ class Party(ModelSQL, ModelView):
|
||||
default['code'] = None
|
||||
return super(Party, cls).copy(parties, default=default)
|
||||
|
||||
@classmethod
|
||||
def search_global(cls, text):
|
||||
for id_, rec_name, icon in super(Party, cls).search_global(text):
|
||||
icon = icon or 'tryton-party'
|
||||
yield id_, rec_name, icon
|
||||
|
||||
@classmethod
|
||||
def search_rec_name(cls, name, clause):
|
||||
parties = cls.search([('code',) + tuple(clause[1:])], order=[])
|
||||
|
||||
Reference in new issue
Block a user