Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
3456 Visualizzazioni

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

thanks in advance.

Avatar
Abbandona
Autore Risposta migliore

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
Abbandona
Post correlati Risposte Visualizzazioni Attività
0
mag 24
1736
1
ago 22
4056
4
giu 24
3226
1
ott 23
3735
0
feb 18
5043