Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
5098 Lượt xem


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





Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

link it with hr.employee instead of res.users

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

thanks it helped

answer is (hr.department)

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 6 24
1501
0
thg 3 15
4289
3
thg 3 15
4328
1
thg 8 25
3491
1
thg 10 24
1851