Odoo Help

2

2
6 Answers
4
fisher
13-09-13 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-14 11:35

Great !!

Aron Lorincz
19-07-16 08:15

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

Vaibhav
20-03-18 00:52

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

0
Sachin Burnawal
28-04-19 05:44

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

Stel een vraag
Writer
Labels
Keep Informed
0 volger(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 E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now