Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
7417 Представления

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

Аватар
Отменить
Лучший ответ

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

Автор

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)'

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.