跳至內容
選單
此問題已被標幟
1 回覆
4007 瀏覽次數

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 !

相關帖文 回覆 瀏覽次數 活動
0
12月 22
3026
0
8月 21
3405
1
2月 21
2683
1
8月 17
4311
1
2月 17
5319