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

Hello there, 
I'm newbie in here, so my question is how can I add new relational fields One2many inside my existing inherit model??
Thank you.

아바타
취소

Are you not able to do it by defining new fields in the inherited model like this

class A(models.Model):

field1

field2

class B(models.Model):

_inherit="A"

one2many_field = fields.One2many(codmodel, inverse_name)

many2many_field = fields.Many2many(comodel)

??

Would have been nicer if you could add more information about the problem you're facing.

작성자

@Karan BK, hey there I've found the solution. What I have done wrong is not mentioned inverse relation in my main module, after doing this things works well, anyway thanks for response. Thanks

관련 게시물 답글 화면 활동
2
7월 24
1845
1
9월 15
5417
1
7월 22
5695
2
2월 21
13142
3
4월 20
11160