تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
4299 أدوات العرض

  I receive  Session expired  exception  when   use  this code  i don't why ?

webauth = self.url + "/web/session/authenticate"
body = {"jsonrpc":"2.0","method":"call","params {"db":"sdsd","login":"admin","password":"admin","base_location":"http://172.16.17.128:8069","session_id":sid,"context":{}},"id":"r1"} headers = {"Content-Type": "Application/json"}

 resp, content = req.request(webauth, "POST", json.dumps(body), headers)

sid = json.loads(content)['result']['session_id']

webauth = self.url + "/web/dataset/call_button"

body = {"jsonrpc":"2.0","method":"call","params":{"model":"ir.module.module","method":"button_immediate_install", "domain_id":None,"context_id":1,
"args":[[175],{}], "session_id":sid, "context":{"lang":"en_US","tz":False,"uid":1}}, "id":"r104"}

 

i got  Session expired   why   ? 

الصورة الرمزية
إهمال