Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
7341 Prikazi

I have custom fields in the contact model or product model, I want the custom fields to be searched by the search bar.

Avatar
Opusti
Best Answer

Hi,

You can inherit the search view of the corresponding model for this. if you take the example for the model res.partner, if you need to search the search bar based on the website field of the partners.


First, activate the developer mode, then if you click in the laddy debugger button near the logged in user name, you can see an option Edit Search View,



Then,

In the pop up you are getting add the bit of code to search the website field too,



For doing the same from the code, please have a look at this link to see how to inherit the search view: Adding filters to existing search views


Thanks

Avatar
Opusti