Odoo Help

0

Inherit Field from Module (v8)

By
TT
on 6/23/16, 8:33 AM 680 views

Hi there

I have two different modules. How can I add a field from the first module in a view of the second module?

I don't get the whole inheritance part somehow, could somebody please explain it to me?

Thank you

1
wizardz
On 6/23/16, 10:25 AM

The inheritance mechanism has not changed. You can use:

class MyModelExtended(Model):
     _inherit = 'a.model'                       # direct heritage
     _inherit = ['a.model, 'a.other.model']     # direct heritage
     _inherits = {'a.model': 'field_name'}      # polymorphic heritage

For more details about inheritance please have a look at

http://odoo-new-api-guide-line.readthedocs.io/en/latest/environment.html?highlight=_inherits #inheritance


0
TT
On 6/27/16, 7:04 AM

Thank you, I will have a look at it. (Not yet 8karma, so I can't comment on your post, sorry)

About This Community

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

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 6/23/16, 8:33 AM
Seen: 680 times
Last updated: 6/27/16, 7:04 AM