search / filter sale_order_line from Parent form
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
This question has been flagged
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 .
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.