简体   繁体   中英

Is it possible to auto login to openerp using xmlrpc?

I have two websites, one is asp.net website, and the other is openerp website. I want to implement SSO from asp.net website to openerp. I already have working Ldap but when i try to redirect to openerp website, I still redirected to login page.

How to auto login in openerp in asp.net. Is it possible to use xmlrpc for that?

not sure, what exactly you want for autologin and even no idea for asp.net xmlrpc library

Here, attaching python code for reference, which I was using for openerp connection through xmlrpc.

If it can help.

sock = xmlrpclib.ServerProxy('http://openerp server domain:port/xmlrpc/object')
result = sock.execute(db, uid, password, 'object', 'method', vals)

#here,

#db - database name
#uid - integer id of openerp user
#object - openerp class 
#method - openerp method to be called
#vals - method arguments

#eg:
result = sock.execute('test', 1, 'admin', 'res.partner', 'create', {'name':'test partner'})

Yes, it is possible to use XMLRPC to get the data from the database of the OpenERP system. XML-RPC can be used with many programming languages like Python, Java, PHP, C, C++, Ruby, Microsoft's .NET, etc. Your question is not that clear (How to auto login in openerp in asp.net?) but in short, you can use XMLRPC and work directly with the data. You can get user id ie uid using following code uid = sock_common.login(dbname, username, pwd) After that you can perform any operation read, write, update, delete operation using XMLRPC. For more information, you can use the URL:

  1. http://doc.openerp.com/v6.1/developer/12_api.html#xml-rpc-web-services
  2. http://forum.openerp.com/forum/topic31615.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM