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

[9.0] How do I access methods of the model which was inherited through delegation?

By
Robert Augustyn
on 11/20/16, 5:06 PM 53 views

HI,

Since delegation inheritance does not inherits methods how would I call a method from the model I have inherited from in my new model?

Thanks,

0

deep

--deep--
1617
| 5 4 7
Bengaluru, India
--deep--

Techno-Functional Associate with 6+ years of experience in Odoo (formerly known as OpenERP).

deep
On 11/21/16, 6:10 AM

I think you got little confused here,

Delegation Inheritance will inherit methods too.

you just need to call it using self.METHOD_NAME


Best example is mail.thread object which would have been inherited in almost the main objects, So if you notice method message_post is actually defined in mail.thread, while its child class can simply call the method the way it calls its own method

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

1 follower(s)

Stats

Asked: 11/20/16, 5:06 PM
Seen: 53 times
Last updated: 11/21/16, 6:10 AM