I have custom fields in the contact model or product model, I want the custom fields to be searched by the search bar.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project management
- MRP
This question has been flagged
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
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up