Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
2 Odpovědi
5094 Zobrazení


.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
Zrušit
Nejlepší odpověď

link it with hr.employee instead of res.users

Avatar
Zrušit
Autor Nejlepší odpověď

thanks it helped

answer is (hr.department)

Avatar
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
1
čvn 24
1496
0
bře 15
4287
3
bře 15
4327
1
srp 25
3490
1
říj 24
1838