Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
5110 มุมมอง


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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มิ.ย. 24
1514
0
มี.ค. 15
4292
3
มี.ค. 15
4332
1
ส.ค. 25
3495
1
ต.ค. 24
1892