Skip to Content
मेन्यू
This question has been flagged
2 Replies
5097 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
1501
0
मार्च 15
4289
3
मार्च 15
4328
1
अग॰ 25
3491
1
अक्तू॰ 24
1848