Odoo Help

Welcome!

This community 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.

0

Get access to another class' method

By
Keywoker
on 11/23/14, 9:07 AM 708 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

--Bole--
2385
| 5 4 6
Zagreb | Karlovac, Croatia
--Bole--

there is only 10 kind of people the ones that understand binary ... and others

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)

 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

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