in my module a username field was included..how can i add a search option to filter by this field username.
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
Hello Jishnu,
You can add filter using inheritance.
For Ex:- If you want add filter in Customer then inherit the customer filter or search view and add your field inside that.
<record model="ir.ui.view" id="res_partner_search_view_inherit_custom">
<field name="name">res.partner.search.view.custom</field>
<field name="model">model.name</field>
<field name="inherit_id" ref="module_name.id_of_search_view"/>
<field name="arch" type="xml">
<field name="field_name" position="after"> #Here field_name is which field after you add your field filter
<field name="your_field"/>
</field>
</field>
</record>
Hope it will helps you.
Thanks,
thank you..it works perfectly
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up