Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
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?
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 or False result = act_obj.read(cr, uid, [id], context=context) 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
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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 8/6/15, 3:52 AM|
|Seen: 711 times|
|Last updated: 8/17/15, 4:21 AM|