Skip to Content
Menu
This question has been flagged
2 Replies
5116 Rodiniai


.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 ?





Portretas
Atmesti
Best Answer

link it with hr.employee instead of res.users

Portretas
Atmesti
Autorius Best Answer

thanks it helped

answer is (hr.department)

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
birž. 24
1523
0
kov. 15
4301
3
kov. 15
4338
1
rugp. 25
3510
1
spal. 24
1932