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

How to get request user's mac address details in odoo controller?

thanks in advance.

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

mac address is not being sent in the request header. so this method only works in a local network.

first, install getmac package:

>> pip install getmac

from getmac import get_mac_address


ip_address = request.httprequest.environ['REMOTE_ADDR'] // get end user IP in controller
mac_address = get_mac_address(ip=ip_address) // get mac_address of given ip in network
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 5 24
1197
1
thg 8 22
3583
4
thg 6 24
2324
1
thg 10 23
2804
0
thg 2 18
4386