Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
5088 Vizualizări


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





Imagine profil
Abandonează
Cel mai bun răspuns

link it with hr.employee instead of res.users

Imagine profil
Abandonează
Autor Cel mai bun răspuns

thanks it helped

answer is (hr.department)

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
1
iun. 24
1493
0
mar. 15
4283
3
mar. 15
4324
1
aug. 25
3489
1
oct. 24
1822