Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
9659 Tampilan

Hi, I wonder if there is any way to get the parameters of the session from python code.

My intention is to determine the client's IP, scanning the meeting OpenERP code in the main.py file in addons \ web \ controllers \ there is a method called authenticate and stored in the selft.session_info (thing) the information about the remote IP 'REMOTE_ADDR'.

there any way to get from the python code that session_info information?.

thanks

Avatar
Buang

req = httplib2.Http() webauth = self.url + "/web/session/get_session_info" body ={"jsonrpc":"2.0","method":"call","params":{"session_id":self.session_id,"context":{}},"id":"r1"} headers = {"Content-Type": "Application/json"} resp, content = req.request(webauth, "POST", json.dumps(body), headers)

Post Terkait Replies Tampilan Aktivitas
3
Sep 20
6345
1
Sep 18
7925
0
Agu 15
20016
1
Mar 15
7796
1
Mei 22
10878