Skip to Content
मेन्यू
This question has been flagged
2 Replies
5172 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
जून 24
1711
0
मार्च 15
4423
3
मार्च 15
4471
1
अग॰ 25
3694
1
अक्तू॰ 24
3475