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

Hello everybody!!

Please, who can explain to me how to modify an existing class using inherits in odoo

Thanks in advance

아바타
취소
베스트 답변

There are three types of inheritance in Odoo. If you want to modify an existing model you should use the "_inherit" attribute and set it to the model you want to modify.

e.g. _inherit = "model.name"

Make sure that you do not set a value to the "_name" attribute since this would create a new model with that name and have the same properties as the model mentioned in the "_inherit" attribute. If you do not use "_name" it will modify the existing model by the name mentioned in the "_inherit" attribute.

Thereafter whatever the columns you define will be added to the existing model and whatever the functions you define will alter the behaviour of existing model.

Hope this helps. :)

아바타
취소
베스트 답변

See in documentation how Build an Odoo module: https://www.odoo.com/documentation/8.0/howtos/backend.html

아바타
취소
작성자

Thanks for the answer but i didnt understand it very well. can you give me a simple example please

Many other links: https://www.odoo.com/forum/help-1/question/how-i-can-create-module-openerp-7-16336

관련 게시물 답글 화면 활동
2
8월 25
2772
1
7월 25
1125
1
8월 25
1152
0
5월 25
1535
2
4월 25
3737