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.
I think you have created a button in form or tree view of a model and trying to call a method in another model. The method for button should be defined in the model itself. To call method in another model, first you have to define a method in the model in form of which the button is created. Then you can call the method of another model from that method using object of the other model.
Suppose you have created a button in form view of sale order as:
<button name="method_a" type="object" string="Call Method" />
If you want to call a method 'method_b' in purchase order,
_inherit = 'purchase.order'
Then you have to define method 'method_a' in sale order as follows:
_inherit = 'sale.order'
Thanks & Regards
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: 3/28/14, 3:23 PM|
|Seen: 2229 times|
|Last updated: 5/26/16, 12:29 AM|