How to update records in Odoo 14 | Using External API | Odoo XMLRPC – CBMS Odoo ERP

How to update records in Odoo 14 | Using External API | Odoo XMLRPC – CBMS Odoo ERP

0 minutes, 30 seconds Read

Records can be updated using write(), it takes a list of records to update and mapping of updated fields to values similar to create().
#odooexternalapi #xmlrpc #odooxmlrpc

url = ”
db = ‘test_local_enterprise_db’
username = ’14’
password = ’14’
import xmlrpc.client
common = xmlrpc.client.ServerProxy(‘{}/xmlrpc/2/common’.format(url))
version = common.version()
print(“version”, version)
uid = common.authenticate(db, username, password, {})
print(“uid = “,uid)
models = xmlrpc.client.ServerProxy(‘{}/xmlrpc/2/object’.format(url))
update_rec = models.execute_kw(db, uid, password, ‘res.partner’, ‘write’, [[id], {‘name’: ” partner”}])
print(“update_rec”,update_rec)

#update #records #Odoo #External #API #Odoo #XMLRPC

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *