This question has been flagged
1 Reply
3647 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?

Avatar
Discard

class_name.method_name: sale_order.A

Best Answer

in method of class class B write something like:

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

 

Avatar
Discard