pedrommuller
pedrommuller

Reputation: 16066

How to delete a default "group by" option in a list view (odoo12)

I've been looking for several options of how to remove a default group by option in Odoo 12 but I haven't found any yet (just how to add one)

I'd like to remove a default group by option from a list view in Odoo 12, to be specific a salesperson option that appears in the default list of the sale module.

default group by options in odoo

Upvotes: 0

Views: 844

Answers (1)

To remove the group you must change (inherit) the search view for the sale.order model (sale.view_sales_order_filter) in the sale module:

<record id="view_sales_order_filter_inherit" model="ir.ui.view">
     <field name="name">sale.order.search.inherit</field>
     <field name="model">sale.order</field>
     <field name="inherit_id" ref="sale.view_sales_order_filter"/>
     <field name="arch" type="xml">
         <xpath expr="//filter[@name='salesperson']" position="replace">
            </xpath>
         </field>
</record>

Upvotes: 2

Related Questions