Class Inheritance in OpenERP
Hi,
I have confused on class inheritance. Take an example. I have 3 classes: A, A1, A2 (these use class inheritance)
- In class A: I override osv write() method to do some general jobs.
- In class A1: A1 inherited from class A. I also override write() method
- In class A2: A2 inherited from class A. Method write() also is overridden.
Now, in class B, there are some codes like this
===
a_obj = self.pool.get('a')
a = a_obj.write(cr, uid, a_id, context=context)
===
When write method is called, what happens? It will call A1's write() method, A2's write() method, A's write() method?
Please help me make clear this. In practice, I use a lot of inheritance, so I need to know the order of execution of the above write() call.
Thank you very much.
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Cuong for more information if necessary.