Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
4001 Vues

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
Ignorer
Auteur

Thank you Niyas!

Meilleure réponse

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
Ignorer
Auteur

Yes, I got it. Thank you Kiran !

Publications associées Réponses Vues Activité
0
déc. 22
3025
0
août 21
3403
1
févr. 21
2682
1
août 17
4308
1
févr. 17
5314