The action must be declared before its corresponding menu in the XML file. Below screen shot shows menu and its corresponding action.

Ex ample :

In this example we will crea te action menu, and our created menu will tri ggering the action.





2. Now create example_action_menu.xml file in module_name/views folder in your created module.

/module_name/views/example_action_menu.xml





<?xml version="1.0" encoding="UTF-8"?> <openerp> The following tag is an action definition for a "window action", that is an action opening a view or a set of views --> before using action= attribute --> its parent example_menu and *after* its action example_list_action --> example _list_action" action="module_name. example_list_action " It is not required when it is the same module --> </openerp>

3. Add your xml file in the data file of __openerp.p y__ file









In our case it shou ld be :

'data' : [ # 'security/ir.model.access.csv', 'templates.xml' , ],