Hello! I am using Odoo 9 webservice, to create leads using Python. Everything works fine, but I have a small problem. When I want to pass the field 'user_id', I get the following error: (u "The loss in the database of ids (\ '1 \') and the presence of extra ids (1), can be caused for some \ \ xfan type of inconsistency in a previous query. ", None) '>.
Send leads with the fields 'partner_id' and 'team_id', and they worked fine. I know they are not the same, but I wanted to try. Does someone go through a similar case or can you help me? Thank you.
Script:
import xmlrpclib
db = '999PRU'
username = 'username'
password = 'password123'
url = ''
common = xmlrpclib.ServerProxy('{}/xmlrpc/2/common'.format(url))
uid = common.authenticate(db, username, password, {})
models = xmlrpclib.ServerProxy('{}/xmlrpc/2/object'.format(url))
id = models.execute_kw(db, uid, password, 'crm.lead', 'create', [{
'name': 'Santiago',
'email_from': 'santi_0898@me.com',
'phone': '',
'user_id': '1'
}])
print id