Odoo Help


How to call the menu action when click on the button?

aneesh ATEES Infomedia Pvt Ltd
on 8/6/15, 3:52 AM 736 views

is it possible to call the menu action by clicking the button?i want to load the create_quotation form when click on the create_quotation button in the another form?how can solve it?


Tarek Mohamed Ibrahim

--Tarek Mohamed Ibrahim--
| 5 3 7
Gîza, Egypt
--Tarek Mohamed Ibrahim--

I am an old VFP developer on ERP

I have moved to 2p since Nov-2014 and started developing with Python on Odoo.



Tarek Mohamed Ibrahim
On 8/6/15, 4:44 AM

Yes you can.

Create a new method in the other form you need to launch the create_quotation from from it and put in it the following code:

def call_quotation(self,cr,uid,ids,context): mod_obj = self.pool.get('ir.model.data') act_obj = self.pool.get('ir.actions.act_window') result = mod_obj.get_object_reference(cr, uid, 'sale', 'act_res_partner_2_sale_order') id = result and result[1] or False result = act_obj.read(cr, uid, [id], context=context)[0] return result

Make the type of the button you created in the other form type="object" and assign to it this method

<button name="call_quotation" type="object" string="Call Quotation"/>

Note : use your preferred names, in place of the bold names above use the exact module/action names

This error occures -"Odoo Warning MissingError One of the documents you are trying to access has been deleted, please try again after refreshing. "

aneesh ATEES Infomedia Pvt Ltd
on 8/6/15, 7:21 AM

pls post the exact code you are using so one can guess/try the error

Tarek Mohamed Ibrahim
on 8/6/15, 7:41 AM

I hope that the one who downvoted my answer to give a reason, this will be very helpful so I take care in the future. Also, I suggest that the site developers to force the one downvoting to give a reason, what the community think??

Tarek Mohamed Ibrahim
on 8/6/15, 7:46 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: 8/6/15, 3:52 AM
Seen: 736 times
Last updated: 8/17/15, 4:21 AM