Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
3564 มุมมอง

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"?

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ก.ย. 23
3840
1
ธ.ค. 22
2147
odoo 13: inverse name in comodel แก้ไขแล้ว
3
พ.ย. 22
4344
1
พ.ย. 22
4653
1
พ.ค. 22
3957