Odoo Help

0

v7: setup session_id

By
feriel bendimerad
on 11/9/14, 9:17 AM 787 views

i've read  this  : https://www.odoo.com/forum/help-1/question/v8-authentification-json-query-has-changed-solved-44073

i've tried to get the sid ( using json queries) from /web/session/get_session_info but i've got nothing , here is the code:

 static final String REQUEST_AUTHENTICATE1 = "/web/session/get_session_info";

 HttpClient httpClient = new DefaultHttpClient();
        
        JSONRPCHttpClient jsonRPC_client = new JSONRPCHttpClient(httpClient, HOST + REQUEST_AUTHENTICATE1);
        jsonRPC_client.setConnectionTimeout(2000);
        jsonRPC_client.setSoTimeout(2000);
        jsonRPC_client.setEncoding("UTF-8");
        
        
        try {
            //set params to send to OpenERP to create the connection
            JSONObject jsonParams = new JSONObject();
            jsonParams.put("db", DATABASE);
            jsonParams.put("login", USER);
            jsonParams.put("password",PASSWORD);
            
            //Do the connection with openERP
            JSONObject json_result = jsonRPC_client.callJSONObject(method, jsonParams);
           Log.d(TAG, "We are connect to OpenERP, session id: " + json_result.getString("session_id"));

            

0
zahid
On 5/12/15, 7:31 AM

Could you be more precise ? what are the errors you've got. Can you just paste the log output.

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)

Stats

Asked: 11/9/14, 9:17 AM
Seen: 787 times
Last updated: 5/12/15, 7:31 AM