Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
3685 Zobrazení

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

Avatar
Zrušit
Nejlepší odpověď

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


Avatar
Zrušit
Autor Nejlepší odpověď

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

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
0
říj 17
9562
2
led 20
15285
16
srp 19
10232
1
led 19
5490
3
čvc 18
3889