The Documentation, for both v15 and v16, shows the following prototype:
models.execute_kw(db, uid, password, 'res.partner', 'write', [[id], {'name': "Newer partner"}])
This is not quite enough information from which to generalize the structure of that final argument. It's clear from the documentation that you can specify an array of id values and that will update all the associated records with the same data values.
However, what does the syntax look like if I am updating more than one field?
Is it this: [[id], [{'field1name': "new field1 value"}, {'field2name': "new field2 value"} ] ]
Or this: [[id], {'field1name': "new field1 value", 'field2name': "new field2 value"} ]
Or something else again?
The documentation directs me to use the same structure as the create call, however, the create call has the same degenerate example for specifying the fields.
I should mention that I am not using any of the example languages to generate these requests (Python, Ruby, etc.). I am building a .net application that will issue JSON requests to the API. For my purposes, it would be very useful to have the prototypes specified using simple JSON, rather than the execute_kw forms ... like this:
{ "jsonrpc": "2.0",
"method":"call",
"id":921359310,
"params": {
"service":"object",
"method":"execute_kw",
"args": [ "odoo_local", "2", "admin", "sale.order.line", "read", [[14, 15, 16, 17]] ]
}
}
These forms can be used, in Postman for example, to directly explore the API.