Odoo Help


View_sales_order_filter : How can I search product_id ?

on 10/5/14, 1:06 PM 523 views

search / filter sale_order_line from Parent form 


Techno-Functional Associate with 6+ years of experience in Odoo (formerly known as OpenERP).

On 10/6/14, 3:46 AM

You have to do a workaround to achieve it....

product_id is present in Order lines, so if you want to make it available for Searching in Order object (parent).. you can achieve it using functional field and its search function...

In Order : add a functional field, and in _fnct_search, you write a logic to search through lines and fetch the parent ids...

it 's advance code but i'll try for me in the future thank you .

on 10/7/14, 5:45 AM
On 10/6/14, 5:48 AM


We can add filter domains.

<record id="search_view" model="ir.ui.view">
            <field name="name">name</field>
            <field name="model">sale.order</field>
            <field name="arch" type="xml">
                <search string="Search">

                       <!--Add this filter domain -->
                       <field name="order_line" filter_domain="[('order_line.product_id.name','ilike',self)]" string="Products"/>
                       <group expand="0" string="Group By...">

Thank you it's easy code for me.

on 10/7/14, 5:42 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

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: 10/5/14, 1:06 PM
Seen: 523 times
Last updated: 3/16/15, 8:10 AM