- Define the partner minimal tree and form view:
<record id="view_all_customers_tree" model="ir.ui.view">
<field name="name">All customers</field>
<field name="model">res.partner</field>
<field name="arch" type="xml">
<tree>
<field name="name" />
</tree>
</field>
</record>
<record id="view_all_customers_form" model="ir.ui.view">
<field name="name">All customers</field>
<field name="model">res.partner</field>
<field name="arch" type="xml">
<form>
<group>
<field name="name" />
</group>
</form>
</field>
</record>
- Update the action from the Adding a menu item and window action recipe to use a new form view:
<record id="action_all_customers_tree" model="ir.actions.act_window.view">
<field name="act_window_id" ref="action_all_customers" />
<field name="view_id" ref="view_all_customers_tree" />
<field name="view_mode">tree</field>
<field name="sequence" eval="2"/>
</record>
<record id="action_all_customers_form" model="ir.actions.act_window.view">
<field name="act_window_id" ref="action_all_customers" />
<field name="view_id" ref="view_all_customers_form" />
<field name="view_mode">form</field>
<field name="sequence" eval="2"/>
</record>
Now, if you open your menu and click on a partner in the list, you should see the very minimal form and tree that we just defined.