Odoo Help

2

2
6 Answers
4
fisher
13‏/9‏/2013 12:37 م

Per testing, I found the following simple solution: adding following line into relevant search view : purchase.order.list.select

<filter name="order_line" string="product name" domain="[('order_line.product_id.name','ilike',self)]"/>

the background logic for the above simple solution is that system take the searching criteria from search view as a domain, per evaluating the domain, ORM returned result list accordingly, in essence, due to the Model relationship, ORM can evaluate doamain on related models( one2many, many2many), so the above mentioned solution can be applied to other business objects, also tested case is searching issues by the associated message content which is very common requirement when dealing with issue tracking.

3 Comments
Yogesh
14‏/10‏/2014 11:35 ص

Great !!

Aron Lorincz
19‏/7‏/2016 8:15 ص

It works if you change 'filter' to 'field'.

Vaibhav
20‏/3‏/2018 12:52 ص

<field name="order_line" string="product name" domain="[('order_line.product_id.name','ilike',self)]"/>

0
Sachin Burnawal
28‏/4‏/2019 5:44 ص

<field name="order_line" string="product name" filter_domain="[('order_line.product_id.name','ilike',self)]"/>

Ask a Question
Writer
Tags
Keep Informed
0 follower(s)
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 eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now