This question has been flagged
1 Reply
3287 Views

how we can remove extra fields from filters??

so that filters contain only useful fields to filter a data.

Avatar
Discard
Best Answer

Hi,

For this, you can inherit and change the search view accordingly. After inheriting the search view, you can add new filters or remove existing filters as per the need.

Have a Look at this Blog and see how to do: Adding filters to existing search views


See the sample of adding new filters in sales,

<record id="view_sale_order_inherit_search" model="ir.ui.view">
<field name="name">sale.order.search.expand.filter</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.sale_order_view_search_inherit_quotation"/>
<field name="arch" type="xml">
<xpath expr="//search" position="inside">
<filter string="Total &lt; 1000" name="total_under_1000" domain="[('amount_total', '&lt;', 1000)]"/>
<filter string="Total &gt;= 1000" name="total_above_1000" domain="[('amount_total', '&gt;=', 1000)]"/>
</xpath>
</field>
</record>


Thanks

Avatar
Discard