Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odgovori
5090 Prikazi


.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
Opusti
Best Answer

link it with hr.employee instead of res.users

Avatar
Opusti
Avtor Best Answer

thanks it helped

answer is (hr.department)

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
1
jun. 24
1494
0
mar. 15
4283
3
mar. 15
4325
1
avg. 25
3489
1
okt. 24
1823