Skip to Content
Menú
This question has been flagged
2 Respostes
5081 Vistes


.py

user = fields.Many2one('res.users', string='User', default=lambda self: self.env.uid)

.xml

<field name="user"/>

return current user who created transaction

here returns ( adminstrator)

but i need the current user department

need to be adminstration dep.

how do i get it ?





Avatar
Descartar
Best Answer

link it with hr.employee instead of res.users

Avatar
Descartar
Autor Best Answer

thanks it helped

answer is (hr.department)

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
de juny 24
1490
0
de març 15
4282
3
de març 15
4319
1
d’ag. 25
3485
1
d’oct. 24
1816