Odoo Help

Andreas Maertens
On 8/30/13, 9:29 AM

I could improve search behavior by adding more "search criteria" to the "search.view" In an addon I added following inherited views to improve searches. This is mainly the same as the module of Grover Menacho does but without the dynamic his module provides.

    <record id="rcs_product_search_form" model="ir.ui.view">
        <field name="inherit_id" ref="base.view_res_partner_filter"/>
        <field name="name">res.partner.select</field>
        <field name="model">res.partner</field>
        <field name="arch" type="xml">
            <field name="name" position="before">
               <field name="street2" string="full-text"
                            ]" />
            <field name="name" position="after">
                <field name="parent_id" filter_domain="[('parent_id','ilike',self)]"/>
                <field name="ref" filter_domain="[('ref','ilike',self)]"/>
                <field name="street" filter_domain="['|',('street','ilike',self),('street2','ilike',self)]"/>
                <field name="zip" filter_domain="[('zip','ilike',self)]"/>
                <field name="city" filter_domain="[('city','ilike',self)]"/>
                <field name="email" filter_domain="[('email','ilike',self)]"/>
                <field name="phone" filter_domain="[('phone','ilike',self)]"/>
                <field name="fax" filter_domain="[('fax','ilike',self)]"/>
                <field name="mobile" filter_domain="[('mobile','ilike',self)]"/>
                <field name="lang" filter_domain="[('lang','ilike',self)]"/>
                <field name="website" filter_domain="[('website','ilike',self)]"/>
                <field name="country_id" filter_domain="[('country_id.name','ilike',self)]"/>
                <field name="ean13" filter_domain="[('ean13','ilike',self)]"/>


        <record id="rcs_product_search_form_view" model="ir.ui.view">
        <field name="inherit_id" ref="product.product_search_form_view"/>
        <field name="name">product.search.form</field>
        <field name="model">product.product</field>
        <field name="arch" type="xml">
            <field name="name" position="before">
               <field name="description" string="full-text"
                            ]" />
            <field name="name" position="after">
                <field name="default_code" filter_domain="[('default_code','ilike',self)]"/>
                <field name="seller_id" filter_domain="[('seller_id','ilike',self)]"/>
                <field name="seller_product_code" filter_domain="[('seller_product_code','ilike',self)]"/>
                <field name="description_sale" filter_domain="[('description_sale','ilike',self)]"/>
                <field name="producer_id" filter_domain="[('producer_id','ilike',self)]"/>
Grover Hernando Menacho Quisbert
On 8/29/13, 3:04 PM


I'm starting with Launchpad so I'm not sure if I did it well anyways you can find a module that improves search of products here:


I hope this can help you.

Thanks for your module. It really improves search a bit and I have some additional ideas, but it doesn't solve the probleme I talked about. The general search still is with an 'and'.

Andreas Maertens
on 8/30/13, 6:55 AM

After thinkin about your module I must say it does solve the Problem in a way. It helps me to find arguments for the existing solution in openerp and I think with your model and the standard behavior this may be the optimal solution. ty

Andreas Maertens
on 8/30/13, 9:31 AM

Yes, but I think I misunderstood your requirement, my module helps you to add fields to search but that was not the principal purpose, it helps you when you are searching a product in a sale order for example, you can write two words separated and you can find the product inmediately. For example 'Coca Cola Light' you only have to write 'Coc Lig' and it's going to find it. Basically it was to help in sale orders, anyways it can be improved a lot even in the search box adding some 'and' or 'or'.

GH Mediacloud, Grover Hernando Menacho Quisbert
on 8/30/13, 10:57 AM

Do you have any idea where to find that functionality? I am looking for since hours.

Andreas Maertens
on 9/2/13, 9:12 AM

I don't think that some functionality like that exists, anyways I'll do it by the same method as I did this module. Only parsing some elements that is not really complicated you'll have a searchbox that can do what you want.

GH Mediacloud, Grover Hernando Menacho Quisbert
on 9/2/13, 10:48 AM
On 11/30/16, 3:34 AM

HELLO i know this post is not from now but i wanted to know if you have found a sloution because i am faced to the same problem

thanks a lot

Sorry, we still have no easy way to do that.

Andreas Maertens
on 11/30/16, 5:01 AM
Ahmet Altinisik
On 6/25/14, 1:07 PM

And I found https://www.openerp.com/apps/7.0/web_filter_and_condition/ - but haven't tested yet!

On 6/23/14, 4:36 AM

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)


Asked: 8/29/13, 11:39 AM
Seen: 6949 times
Last updated: 2/22/18, 9:47 PM