Odoo Help

0

3
2 Answers
3
cd
15.02.14, 09:09

OK, my problem is solved.

Here are the changes, between version 7 and 8.

1-the name of the cookie
V7 = "sid"
V8 = "session_id"

2-in the JSON queries
V7 = need to put "session_id":"xxxxxxxxxxxxxxxxxxxxx"
V8 = no need

Example :
{"jsonrpc":"2.0","method":"call","params":{"model":"res.partner","fields":["name","ref","credit_limit","fax","sale_warn","sale_warn_msg","property_product_pricelist","property_payment_term","sale_order_count","phone","email","country_id"],"domain":[["customer","=",1],["is_company","=",1],["display_name","ilike","AGR"]],"context":{"lang":"fr_FR","tz":"Europe/Brussels","uid":1,"search_default_customer":1,"bin_size":true},"offset":0,"limit":80,"sort":"","session_id":"1bc3ee4bdbbf432f88b38313c4d35ae2"},"id":791668276}

3-the mechanism
V7=need to set the cookie, with the value (retrieved from the header) and not the session_id (sent by OpenERP, after authentification)
V8=both are identical

Last but not least : "web/session/authenticate" is working fine V8. I made a mistake.

1 Comment
feriel bendimerad
09.11.14, 09:22

what do you mean by: retrieved from the header ? do you think it's possible to associate the session_id with an URL so that tue user can connect automaticly to Openerp v7

0
liuchang
03.06.14, 22:01

v7:

server_response = requests.post('http://localhost:8069/web/session/get_session_info', json.dumps(post_data), cookies=self._cookies)

server_response.status_code=200

server_response.json() is no problem

v8:

server_response.status_code=500 

server_response.json() is error

 

what changes i do that make me can use server_response.json() in v8?

 

Ask a Question
Writer
88
cd
Tag
Keep Informed
2 follower(s)
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 eLearning platform and experience all Odoo Apps through learning videos, use cases and quizzes.

Test it now