Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
3980 Tampilan

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!


Avatar
Buang
Penulis

Thank you Niyas!

Jawaban Terbai

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

Avatar
Buang
Penulis

Yes, I got it. Thank you Kiran !

Post Terkait Replies Tampilan Aktivitas
0
Des 22
3002
0
Agu 21
3397
1
Feb 21
2668
1
Agu 17
4293
1
Feb 17
5286