콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

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

아바타
취소
베스트 답변

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


아바타
취소
작성자 베스트 답변

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

아바타
취소
관련 게시물 답글 화면 활동
0
10월 17
9765
2
1월 20
15423
16
8월 19
10383
1
1월 19
5595
3
7월 18
4084