跳至內容
選單
此問題已被標幟
2 回覆
5118 瀏覽次數


.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
1523
0
3月 15
4302
3
3月 15
4338
1
8月 25
3510
1
10月 24
1933