1
votes

I want to add a custom search filter like this :

enter image description here

enter image description here

when I apply a filter like this is doesn't work

<filter string="Societe" name="company_id" domain='[("company_id","like","")]'/>

in my case, I want the condition is what the user enters on the search input input

2

2 Answers

3
votes

It doesn't work because you shoud apply it on the name field.

 domain='[("company_id.name","like","")]'
2
votes

Actually you just need to add the field company_id as extension to a search view or just add it in your own search view:

<field name="company_id" />

And that's it. Now while typing a search term, the search view should show the user multiple search options.