Duration 2:24

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

2 314 watched
0
10
Published 20 Jul 2021

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 = "http://localhost:8041 " 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)

Category

Show more

Comments - 0