Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
3984 Vizualizări

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!


Imagine profil
Abandonează
Autor

Thank you Niyas!

Cel mai bun răspuns

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

Imagine profil
Abandonează
Autor

Yes, I got it. Thank you Kiran !

Related Posts Răspunsuri Vizualizări Activitate
0
dec. 22
3003
0
aug. 21
3397
1
feb. 21
2670
1
aug. 17
4293
1
feb. 17
5287