How to inherit an action and add a default filter?
20 October, 2021 by
Umme Huzaifa
| No comments yet

Solution: Here is an example of how to add default group by States in employee Payslip tree view in odoo 11. 

      <xpath expr="//search" position="inside">

               <filter name="state" string="States" domain="[]" context="{'group_by':'state'}"/>

        </xpath>

  <record id="hr_payroll.action_view_hr_payslip_form" model="ir.actions.act_window">

<field name="search_view_id" ref="hr_payroll.view_hr_payslip_filter"></field>

<field name="context">{'search_default_state': 1}</field>

</record>

Umme Huzaifa
20 October, 2021
Share this post
Archive
Sign in to leave a comment