Adding a menu item and window action
The most obvious way to make a new feature available to the users is by using a menu item. When you click on a menu item, something happens. This recipe walks you through how to define that something.
We will create a top level menu displaying a sub menu in the left hand menu bar, opening a list of all the customers.
This can also be done using the web user interface, via the settings menu, but we prefer to use XML data files since this is what we'll have to use when creating our addon modules.
How to do it...
In an XML data file of our addon module, perform the following steps:
Define an action to be executed:
<act_window id="action_all_customers" name="All customers" res_model="res.partner" view_mode="tree,form" domain="[('customer', '=', True)]" context="{'default_customer': True}" limit="80" />
Create the menu structure:
<menuitem id="menu_custom_toplevel" name=...