Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
5111 Widoki


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





Awatar
Odrzuć
Najlepsza odpowiedź

link it with hr.employee instead of res.users

Awatar
Odrzuć
Autor Najlepsza odpowiedź

thanks it helped

answer is (hr.department)

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
cze 24
1514
0
mar 15
4296
3
mar 15
4334
1
sie 25
3498
1
paź 24
1903