Odoo Help


How can we search by a specific field ? {V8}

on 4/22/16, 10:05 AM 472 views

What happened ?

i have added a field in my product form , which display the number of the product . Everything works fine. Now what i want to do , is to be able to make a search by the new field ( number ) .

I went to settings - Fields and i saw that i have the option Not Searchable and i change it to searchable . But it still can't search , anyone know why?

And what if my data isn't a computed one? i have added an integer field in the product form. 

on 4/22/16, 5:38 PM
On 5/12/16, 1:24 PM

Hello Nizar, 

i don't know if you solved the problem or you still looking for a solution..

this is done by creating a search view that looks like this : 

<record id="your Id " model="ir.ui.view">
    <field name="name"> search</field>
    <field name="model">Your model</field>
    <field name="arch" type="xml">
        <search string="searchbyname">
            <field name="number"/>        
            <group string="Filter">     // if you want to set filters...

Now all you have to do is to  fill the seach box with  a number and choose search in number.

let me know if it works 

Best regards. 

On 5/12/16, 11:17 AM

Thanks for the answer , My field is not computed. I have just added a field called number to my products. What i want to do , is to make a search on my products by number. Any help?

Mohamed Essakali
On 4/22/16, 3:51 PM

If your field is a computed one (Function), it must be stored to allow searching on. In this case you must add store=True. 

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 4/22/16, 10:05 AM
Seen: 472 times
Last updated: 5/12/16, 1:24 PM