Am 09.04.2012 07:05, schrieb zaki1029:
Hi Team,Recently I'm doing some investigation against the process regarding how to add an user account from outside. It is some kind like SSO concept but it cannot be impletmented by openid for the sake of some customization requirement. Here is my process: 1. System get some parameters regarding user's info like user name and session from GET (from url) or POST method 2. System will add the user account into the res.users table. Upon my investigation, we could add a method with type of httprequest in class web.webclient and use a grammar like req.session.model('res.users').write(cr, uid, uid, res) to insert the data. But since the user has not logged into the system at this stage, we might not be able to get cr or uid info and carry out this method, how could we add the user programmatically? Is there any practice before that could make the scenario work? Any feedback will be greatly appreciated.
From external, you can use XMLRPC calls, with the user data of a user having the rights to add other users, e.g. admin.
http://doc.openerp.com/v6.0/developer/6_22_XML-RPC_web_services/index.htmlPlease be aware of security issues here, and use secure XMLRPC or at least local communication only for example.
You may find examples (Create a partner and his address) on the webpage above.
There are also examples on different languages than Python.Please note: OpenERP is kind of stateless. The login(dbname, username, password) only "converts" the username into a system uid.
Regards, Marco
<<attachment: marco_dieckhoff.vcf>>
_______________________________________________ Mailing list: https://launchpad.net/~openerp-expert-framework Post to : [email protected] Unsubscribe : https://launchpad.net/~openerp-expert-framework More help : https://help.launchpad.net/ListHelp

