Se rendre au contenu
Menu
Cette question a été signalée
1 Répondre
2849 Vues

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

thanks in advance.

Avatar
Ignorer
Auteur Meilleure réponse

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
Ignorer
Publications associées Réponses Vues Activité
0
mai 24
1197
1
août 22
3584
4
juin 24
2329
1
oct. 23
2805
0
févr. 18
4388