In update records can be updated using write(), it takes a list of records to update and a mapping of updated fields to values similar to create() .for example code is like below.
models.execute_kw(db, uid, password, 'res.partner', 'write', [[id], {
'name': "Newer partner"
}])
# get record name after having changed it
models.execute_kw(db, uid, password, 'res.partner', 'name_get', [[id]])
Note- Update will all get the same values for the fields being set.
0 Comment(s)