Odoo Help


Create Users Via API?

on 5/14/15, 12:35 PM 2,798 views

I tried to create new users via XML-RPC but i got this error:

xmlrpclib.Fault: <Fault You cannot create a new user from here. 
To create new user please go to configuration panel.

I can import users creating new records directly in PgAdmin but I would like not do this.

Users can be created only manually? Or there's a way to create/import them in automatic way?

Any help is appreciated


Jusab Sida (jsi)

--Jusab Sida (jsi)--
| 2 2 5
Gandhinagar, India
--Jusab Sida (jsi)--

Jusab Sida (jsi)
On 5/15/15, 6:51 AM

Hi Cole,

    It seems like you are gives data without 'login' fields.

At the time of creating user, odoo will check that data contain 'login' or not(i.e. this field must contain some data).

Can u check your values whatever u pass in create method.

let me inform if u got any problem...

Hope this will help you.

On 9/21/15, 10:23 AM

import xmlrpclib

url = "http://localhost:8069"

db = "db"

username = 'admin'

password = 'admin'

common = xmlrpclib.ServerProxy('{}/xmlrpc/2/common'.format(url)

uid = common.authenticate(db, username, password, {})

models = xmlrpclib.ServerProxy('{}/xmlrpc/2/object'.format(url)

user_id=models.execute_kw(db, uid, password, 'res.users', 'create', [{'name':"user", 'login':'user@gmail.com',

'company_ids':[1], 'company_id':1, 'new_password':'12345'}])

print user_id

If I try the this, I get {"faultCode":4,"faultString":"(u'The requested operation cannot be completed due to security restrictions. Please contact your system administrator.\\n\\n(Document type: Users, Operation: write)', None)"}. Could you tell me what's going on? (The user has all rights to "res_users all")

Hans van den Elsen
on 11/29/15, 1:25 PM

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.


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

1 follower(s)


Asked: 5/14/15, 12:35 PM
Seen: 2798 times
Last updated: 1/4/17, 6:28 PM