Odoo Help

0

View_sales_order_filter : How can I search product_id ?

By
kitcle
on 10/5/14, 1:06 PM 668 views

search / filter sale_order_line from Parent form 

0

deep

--deep--
1781
| 5 5 7
Bengaluru, India
--deep--

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

deep
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 .

kitcle
on 10/7/14, 5:45 AM
0
PARVATHY VIJAYAN P
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...">
                       </group>
                </search>
            </field>
        </record>

Thank you it's easy code for me.

kitcle
on 10/7/14, 5:42 AM

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.

Register

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)

Stats

Asked: 10/5/14, 1:06 PM
Seen: 668 times
Last updated: 3/16/15, 8:10 AM