Odoo Help

0
0
Pinakin Nayi (pna)
On 12/6/18, 7:43 AM

You can update the code something like,

import xmlrpc.client
host='localhost'
port=8069
url = "http://localhost:8069/xmlrpc"
db = 'test_website'
username = 'admin'
password = 'a'
print ("URLL", url)
common = xmlrpc.client.ServerProxy(url +'/common')
uid = common.login(db, username, password)
print ("UIDDD", uid)
models = xmlrpc.client.ServerProxy(url +'/object')
prodid = models.execute_kw(db, uid, password, 'product.template', 'create', [{
    'categ_id': 1,
    'name': 'Yet another thing',
    'uom_id': 1,
    'uom_po_id': 1,
  }])

0
John Ashurst
On 12/6/18, 4:41 AM

Try removing the `create_uid`

I think this is auto created from the `uid` you pass with the db etc.

About This Community

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

Question tools

1 follower(s)

Stats

Asked: 2/1/18, 4:44 AM
Seen: 893 times
Last updated: 12/6/18, 7:43 AM