I try following : { "method": "model.party.party.create", "params": { "first_name": "p", "name": "A" } }
*Error* <html> <head> <title>502 Bad Gateway</title> </head> <body bgcolor="white"> <center> <h1>502 Bad Gateway</h1> </center> <hr> <center>nginx/1.4.1</center> </body> </html> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> <!-- a padding to disable MSIE and Chrome friendly error page --> On Wednesday, May 25, 2016 at 7:32:54 PM UTC+5:30, Sergi Almacellas Abellana wrote: > > El 25/05/16 a les 13:18, Akshay patel ha escrit: > > > > *I try to create a new party record as follow:* > > > > { > > > > "method": "model.party.party.create", > > > > "params": [5, "02d34f6c010a46e4aab8a9deb4a12d17", { > > > > "first_name": "p", > > > > "name": "A" > > > > }, { > > > > "values": { > > > > "first_name": "p", > > > > "name": "A" > > > > } > > > > }] > > > > } > > > > The create method expects a list of dictionaries as explained in the > docs[1] > > I see you have a "values" dictionary which doest not seem correct, so > the following parameters: > > [{"first_name": "p","name": "A"}, {"first_name": "p","name": "A"}] > > Will create two parties, with name A and first_name p. > > Hope it helps! > > > [1] > > http://doc.tryton.org/4.0/trytond/doc/ref/models/models.html?highlight=create#trytond.model.ModelStorage.create > > > > -- > Sergi Almacellas Abellana > www.koolpi.com > Twitter: @pokoli_srk > -- You received this message because you are subscribed to the Google Groups "tryton" group. To view this discussion on the web visit https://groups.google.com/d/msgid/tryton/d45482fe-6149-4e2b-af59-41f16617fe48%40googlegroups.com.