Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
2 Risposte
5087 Visualizzazioni


.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
Abbandona
Risposta migliore

link it with hr.employee instead of res.users

Avatar
Abbandona
Autore Risposta migliore

thanks it helped

answer is (hr.department)

Avatar
Abbandona
Post correlati Risposte Visualizzazioni Attività
1
giu 24
1493
0
mar 15
4283
3
mar 15
4324
1
ago 25
3489
1
ott 24
1822