Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
2 Respostas
5085 Visualizações


.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
Cancelar
Melhor resposta

link it with hr.employee instead of res.users

Avatar
Cancelar
Autor Melhor resposta

thanks it helped

answer is (hr.department)

Avatar
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
1
jun. 24
1493
0
mar. 15
4283
3
mar. 15
4324
1
ago. 25
3489
1
out. 24
1822