Search views
The search options available are defined through the <search>
view type. We can choose the fields that can be automatically searched when typing in the search box. We can also provide predefined filters, activated with a click, and predefined grouping options to be used in list views.
Here is a possible search view for the To-Do Tasks:
<record id="view_filter_todo_task" model="ir.ui.view"> <field name="model">todo.task</field> <field name="priority">15</field> <field name="arch" type="xml"> <search> <field name="name"/> <field name="user_id"/> <filter name="filter_not_done" string="Not Done" domain="[('is_done','=',False)]"/> <filter name="filter_done" string="Done" domain="[('is_done','!=',False)]"/> <separator/> <filter name="group_user" string="By User" context="{'group_by': 'user_id'}"/> </search...