There's more...

As we saw in the Adding a menu item and window action recipe, we can replace act_window with <record>. If you want to use a custom view, you can follow the given syntax:

<record id='action_all_customers' model='ir.actions.act_window'>
<field name="name">All customers</field>
<field name="res_model">res.partner</field>
<field name="view_mode">tree,form</field>
<field name="domain">[('customer', '=', True)]</field>
<field name="context">{'default_customer': True,
'tree_view_ref': 'my_module.view_all_customers_tree'.
'form_view_ref': 'my_module.view_all_customers_form'
}</field>
<field name="limit">20</field>
</record>
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset