Hello, wanna ask if there is a way to call method on a menu. For example, when user click Sales Order i want to execute my custom method. If there is how? Any one knows?
Anirudh, a menu can call an action. There are at least 4 types of actions that OpenERP provides
- window action, which will display the views, etc
- report action that will run a report (like from the Print shortcut)
- server action that will run an ORM method of your choice (with certain limitations)
- cliet action that will run something in web client.
So, yes you can run a method from a menu (without showing any window), but I think from user experience perspective it is not too good as the user will have no feedback on what is happening.
Basically when you click on Menu, there is no specific methods available in which you can add custom code.
But I guess you know,
Menu >> Action >> Views ( Tree, Form )
So We can inherit field_view_get method of any class specified in that View.
Still I request you to please give detailed purpose of what you want to do exactly when you click on Sale Order menu.
May be after knowing the exact purpose we can help you more.