Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
1 Ответить
2881 Представления

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

thanks in advance.

Аватар
Отменить
Автор Лучший ответ

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
Аватар
Отменить
Related Posts Ответы Просмотры Активность
0
мая 24
1232
1
авг. 22
3598
4
июн. 24
2373
1
окт. 23
2831
0
февр. 18
4438