Add some icons to global search
review3511002
This commit is contained in:
1 parent
37012e069d
commit
efeb5ebd90
1 file changed
+12
+12
@@ -119,6 +119,12 @@ class Template(ModelSQL, ModelView):
|
||||
values.setdefault('products', None)
|
||||
return super(Template, cls).create(vlist)
|
||||
|
||||
@classmethod
|
||||
def search_global(cls, text):
|
||||
for id_, rec_name, icon in super(Template, cls).search_global(text):
|
||||
icon = icon or 'tryton-product'
|
||||
yield id_, rec_name, icon
|
||||
|
||||
|
||||
class Product(ModelSQL, ModelView):
|
||||
"Product Variant"
|
||||
@@ -211,6 +217,12 @@ class Product(ModelSQL, ModelView):
|
||||
res[product.id] = getattr(product, field)
|
||||
return res
|
||||
|
||||
@classmethod
|
||||
def search_global(cls, text):
|
||||
for id_, rec_name, icon in super(Product, cls).search_global(text):
|
||||
icon = icon or 'tryton-product'
|
||||
yield id_, rec_name, icon
|
||||
|
||||
@classmethod
|
||||
def search_domain(cls, domain, active_test=True):
|
||||
def convert_domain(domain):
|
||||
|
||||
Reference in new issue
Block a user