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

Hello everybody, I am new to odoo and I am working with version 13, I tried inheriting the hr.contact model to add terms but the result I get is that I can't add any term ...

here is the contact.py file  :    

rom odoo import models, fields


class HrContract(models.Model):
_inherit = "hr.contract"
term_ids = fields.One2many('hr.contract.type.term', 'contract_type_id')


class HrContractTypeTerm(models.Model):
_name = 'hr.contract.type.term'
_description = 'Employee Contract Types Terms'

contract_type_id = fields.Many2one('hr.contract.type')
sequence = fields.Integer(default=10)
name = fields.Char(required=True)
body = fields.Text(required=True)
and here is the view file 




hr.contract.inherited.contract_type
hr.contract































Contract
hr.contract
tree,form












































thank you in advance.

PS:  how can I add a screenshot here to explain more the problem

아바타
취소
베스트 답변

Hello @Asma Ben Brahem

please check the access rights of new model.

아바타
취소
베스트 답변

Have you set access rights for "hr.contract.type.term"?

아바타
취소
관련 게시물 답글 화면 활동
2
9월 23
3845
1
12월 22
2151
3
11월 22
4348
1
11월 22
4655
1
5월 22
3958