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,
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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,
Robert explicitly asks about delegation inheritance which indeed does not inherit methods (and it's a problem). But you instead talk about Traditional inheritance which does inherit methods and so requires no explanation.
FYI:
delegation inheritance: Product => Template:
_inherits = {'product.template': 'product_tmpl_id'}
traditional inheritance: Template => mail.thread:
_inherit = ['mail.thread']
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