Odoo Help


Is it possible to call method on menu?

Anirudh Lou
on 10/18/14, 4:22 AM 1,583 views

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?




| 5 3 6
Jakarta, Indonesia
On 10/20/14, 7:54 AM

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.

based on this question, as i also have this question , so i test with a case , please read ... http://blog.instant-erp.com/2014/11/how-to-link-odoo-orm-method-with-menu.html

Kalmen Chia / E-Global SCM Solutions Sdn Bhd
on 11/23/14, 10:01 AM


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.


Thanks for reply sir, actually my aim is to delete what is being stored on the database so that it cannot be reloaded and without user clicking the delete button.

Anirudh Lou
on 10/18/14, 9:52 AM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)


Asked: 10/18/14, 4:22 AM
Seen: 1583 times
Last updated: 10/30/15, 3:06 PM