Skip to Content
Menu
This question has been flagged

How would you go about adding custom, searchable data to the website search bar? Where do you need to add the custom data(One2many fields) for it to show up on a search? 

Avatar
Discard
Author Best Answer

Soo i figured it out by myself

inherit product.template and run the function and then just append to  search_fields


 @api.model    
 def_search_get_detail(self, website, order, options):            
    search_details = super(ProductTemplate, self)._search_get_detail(website, order, options)
 search_details['search_fields'].append('your products')


Avatar
Discard
Related Posts Replies Views Activity
5
Mar 22
14141
3
Jun 23
3007
0
Oct 22
1998
1
Jun 22
1828
0
Jun 22
947