Passa al contenuto
Menu
È necessario essere registrati per interagire con la community.
La domanda è stata contrassegnata
1 Rispondi
2825 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
1187
1
ago 22
3579
4
giu 24
2314
1
ott 23
2792
0
feb 18
4381