跳至内容
菜单
此问题已终结
2 回复
5114 查看


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





形象
丢弃
最佳答案

link it with hr.employee instead of res.users

形象
丢弃
编写者 最佳答案

thanks it helped

answer is (hr.department)

形象
丢弃
相关帖文 回复 查看 活动
1
6月 24
1522
0
3月 15
4298
3
3月 15
4338
1
8月 25
3509
1
10月 24
1926