Odoo Help

0

Get access to another class' method

By
Keywoker
on 11/23/14, 9:07 AM 1,014 views

I have a custom module, where there is the class:

class sale_order(orm.Model):
    _inherit = 'sale.order'

..............................................

and another class:

class procurement_order(orm.Model):
    _inherit = "procurement.order"
..............................................

In the first class, for example, I have the method A. In the second one, the method B. How can I call the class A from the second class?

class_name.method_name: sale_order.A

Med Said BARA
on 11/23/14, 10:14 AM
0
Bole
On 11/24/14, 3:59 AM

in method of class class B write something like:

res_a = self.pool.get('class.a.name').method_name(*args,**kwargs)

 

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

Question tools

2 follower(s)

Stats

Asked: 11/23/14, 9:07 AM
Seen: 1014 times
Last updated: 3/16/15, 8:10 AM