跳至内容
菜单
此问题已终结
8877 查看

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

形象
丢弃

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)

相关帖文 回复 查看 活动
3
9月 20
5694
1
9月 18
7577
0
8月 15
19154
1
3月 15
7231
1
5月 22
10271