All the fields are always present in advanced search panel in order to retrieve/search information quickly.
However Odoo provides us enough flexibility to hide certain fields from users in the advanced search panel for some security purpose in an organization.
We can implemented this feature with fields_get method in the respected module.
def fields_get(self, cr, uid, fields=None, context=None, write_access=True):
fields_to_hide = [‘list of fields to hide’]
res = super(class_name, self).fields_get(cr, uid, fields, context)
for field in fields_to_hide:
res[field][‘selectable’] = False
So it is clear from above piece of code that once we reload the view and look into advanced search panel then the fields which we have inserted into fields_to_hide list are not visible from advanced search.
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!