Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
1 Balas
3446 Tampilan

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

thanks in advance.

Avatar
Buang
Penulis Jawaban Terbai

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
Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
0
Mei 24
1728
1
Agu 22
4054
4
Jun 24
3211
1
Okt 23
3722
0
Feb 18
5040