Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
For searching purchase orders, normally we search by product other than PO header information such as supplier, even though there is product field (related) available on the purchase order header table, it seems this field only linked to the first item of the PO, so it is not useful for searching PO by product.
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.
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
|Asked: 9/13/13, 6:34 AM|
|Seen: 5985 times|
|Last updated: 7/19/16, 8:15 AM|