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/5745B086.2070809%40koolpi.com.

Reply via email to