Sunday, November 23, 2014

How to link an Odoo ORM method with menu without writing a singleline of code ?

I am looking the above answer and found a link , but i still this is not what i want ,

the scenario is this ,

  • i have a sale.lead with a method call process_daily_lead 
  • it is designed to be a scheduler function but i need this to be called ad-hoc for testing purpose and i do not wish to write a line of code , can i do it ...

after much hacking for about half an hour , this is what i found out !
the magic lies here ...

  • Menu and Server Actions only !
First ,
we need to set up at the Menu ,

and the server action setup is as follow , you should by right , create the server action 1st,

if you put a test code , e.g. print 'i am here' are the module py code , 
if everything goes , well , u will get an extra menu under sales/sales and when you click it
it will directly execute function.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.