JSON-RPC Call for Create, Update, Delete

Hi,

I am doing a Flutter application which want to connect to Tryton. I am going to use JSON-RPC for the connection.

I used this code for testing:

It able to read and search.
But I am confuse for how to pass the parameter for create, update , delete.

For create:

resp = client.model('party.party', 'create', kwargs={
   "vlist":[{"name":'testparty'}], 
})

it return response: result:

For Update, and Delete --> totally no clue for how to pass the parameter.

JSON-RPC does not support keyword arguments but only a list of argument. And you must not forget to put a last argument as the context.

So it should look like:

ctx = {}
resp = client.model('party.party', 'create', args=[[{"name":'testparty'}], ctx])

A post was split to a new topic: Make RPC call from Flutter and dio