Odoo Help

Welcome!

This community 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.

0

Is it possible to call a method using action menus?

By
Umashankar Subramani
on 1/24/15, 1:52 AM 905 views

Hi

   I have a doubt that is it possible to call a method using action creation ,using the bellow i have called a view but is it possible to call a method , here is the code

 <act_window name="New Sub menu"
                res_model="wizard.popup"
                src_model="wizard.popup"
                key2="client_action_multi"
                view_mode="form" target="new"
                view_type="form"
                id="act_new_sub_menu" />

               This code will add a menu to More option in the view, while clicking that menu it will call the form view  , can anyone give me suggestion....... Thanks in advance...

0

Ivan

--Ivan--
3210
| 5 3 6
Jakarta, Indonesia
--Ivan--
Ivan
On 1/24/15, 3:21 AM

Yes, but you need to create a server action instead.  Check the action_partial_move_server in odoo/addons/stock/wizard/stock_partial_move_view.xml.  The ir_open_partial_move_wizard entry will put it in More menu.

I am new to odoo Ivan can you please elaborate.... or give me examples so that i can understand..... Thanks in advance..

Umashankar Subramani
on 1/24/15, 3:30 AM

I found it Ivan, my code is... sample view ir.actions.server wizard.popup 489 form form code self.sample_print(self,cr,uid) I am getting error like this "'wizard.popup' object has no attribute 'execute'" while evaluating u'self.sample_print(self,cr,uid)'

Umashankar Subramani
on 1/24/15, 7:01 AM

Take a look at how action_partial_move method is defined. If sample_print is the method that you want to call, then it has wrong signature.

Ivan
on 1/24/15, 7:29 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 1/24/15, 1:52 AM
Seen: 905 times
Last updated: 3/16/15, 8:10 AM