Odoo Help

Welcome!

This community 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.

0

export record programmatically, session_id mssing

By
Patrik
on 4/25/16, 8:17 AM 324 views

Hi

I try to simulate the functionallity which happens while exporting a record. This url is used:
web/export/csv

I analysed whats happening and if I set the session_id and token manually it's working fine. Now what I try to do is to get the session_id in my script but I have no success so far.


session = requests.Session()
session_id = session.get('http://url').cookies.get_dict()["session_id"]


I get a session_id with the code above but I guess it's not from a authenticated user.

So my question is how do I get a session_id from a authenticated user? I can login with xmlrpc interface just fine, but I didn't find any information how to get to the session_id.

Thank you for your help

0
Patrik
On 4/26/16, 10:31 AM

The solution [1] was to make a request to web/session/authenticate to get the session_id of a authenticated user.

[1] http://www.vernichon.fr/?p=1179


Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 4/25/16, 8:17 AM
Seen: 324 times
Last updated: 4/26/16, 10:32 AM