Skip to Content
Menu
This question has been flagged
2 Replies
4173 Views


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

link it with hr.employee instead of res.users

Avatar
Discard
Author Best Answer

thanks it helped

answer is (hr.department)

Avatar
Discard
Related Posts Replies Views Activity
1
Jun 24
215
0
Mar 15
3392
3
Mar 15
3408
1
Oct 24
279
2
Jul 24
471