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

Hello,

I'm trying to get already value from job_title field of hr.employee model like:

abc = fields.Many2one('hr.employee.job_title', 'Job Title')


But I got the error message when clicking on the field in form view although I used administrator user to access it:

Something went wrong !


Sorry, you are not allowed to access documents of type 'Unknown' (_unknown). No group currently allows this operation. - (Operation: read, User: 2)


What am I doing wrong? 

Please help!

Thank you!


อวตาร
ละทิ้ง
ผู้เขียน

Thank you Niyas!

คำตอบที่ดีที่สุด

Hi ,

abc = fields.Char( 
related='employee_id.job_title',
string='Job Title',store=True
)

Job Title in hr.employee is a character field and  use related to get data from employee_id

อวตาร
ละทิ้ง
ผู้เขียน

Yes, I got it. Thank you Kiran !

Related Posts ตอบกลับ มุมมอง กิจกรรม
0
ธ.ค. 22
2783
0
ส.ค. 21
3200
1
ก.พ. 21
2385
1
ส.ค. 17
4149
1
ก.พ. 17
5062