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

Hi everyone,

Say we have a sale team with access to a view form with a custom button in it.

If one of them login with his own odoo account and click on that button, is there a method to log that it is him that click on that button, a this time, etc ?


Thank you for your help.

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

Hi everyone,

I found a way.

in the action definition triggered by the button. You can access current user like this:

def test_identifier(self):
_logger.error("TEST LOG USER ID" + self.env.user.name)

I hope this will help
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 12 23
2970
2
thg 10 23
6151
3
thg 9 23
3026
0
thg 5 23
2980
1
thg 5 23
2338