In Odoo, when the mouse is hovered over the search bar, a dropdown appears by default. I want to hide some of the values from that dropdown so that the user cannot see them. How can I remove those values?
In odoo 18, i create custom module so if i hide odoo by default features like in serach baar if i hover the mouse so visible are Filter, Group etc... so i want to hide some select value
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Accounting
- Inventory
- PoS
- Project
- MRP
This question has been flagged
Hii,
Let's say you have this original search view:
<search> <filter name = "my_records" string = "My Records" domain = "[('user_id', '=', uid)]"/> <filter name = "closed" string = "Closed" domain = "[('state', '=', 'closed')]"/> <group name = "group_by"> < filter name = "user_id" string = "Salesperson" context = "{'group_by': 'user_id'}" /> < filter name = "partner_id" string = "Customer" context = "{'group_by': 'partner_id'}" /> </ group > </ search >
You only want to hide:
- The filter called "Closed"
- The group-by called "Salesperson"
Your Custom Module XML:
< record id = "your_custom_search_view" model = "ir.ui.view" > < field name = "name" >sale.order.search.inherit.custom </ field > < field name = "model" >sale.order </ field > <!-- Change this to your model --> < field name = "inherit_id" ref = "sale.view_sale_order_filter" /> <!-- Original search view --> < field name = "arch" type = "xml" > <!-- Remove "Closed" filter --> < xpath expr = "//filter[@name='closed']" position = "replace" /> <!-- Remove "Salesperson" group-by --> < xpath expr = "//group[@name='group_by']" position = "inside" > < xpath expr = "//filter[@name='user_id']" position = "replace" /> </ xpath > </ field > </ record >
i Hope it is use full
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
1
Aug 25
|
247 | ||
|
0
Aug 25
|
185 | ||
|
0
Jul 25
|
1161 | ||
|
0
Jul 25
|
3 | ||
|
0
Jul 25
|
6 |