Parameters for Json requests

54 views
Skip to first unread message

Simon Tapmeyer

unread,
Jul 1, 2016, 10:35:04 AM7/1/16
to tryton
Hello,

I would like to connect some external proccesses to tryton using the json api. How can I figure out what parameters the methods derived with "system.server.listMethods" need and what the methods exactly do?

Regards
Simon Tapmeyer

Cédric Krier

unread,
Jul 2, 2016, 3:55:03 AM7/2/16
to tryton
You can use the call to system.methodHelp but system.methodSignature is
not implemented because trytond is written in Python.
Indeed most of the methods have always the same API for any Models and
for special cases, the best is to read the code that implement it.

--
Cédric Krier - B2CK SPRL
Email/Jabber: cedric...@b2ck.com
Tel: +32 472 54 46 59
Website: http://www.b2ck.com/

Simon Tapmeyer

unread,
Jul 4, 2016, 2:55:02 AM7/4/16
to tryton
Hello,

thank you for the answer. If I would like to do "model.production.on_change_warehouse" where would I look for the code which implements it. Could you give me an advice?

Regards
Simon

Cédric Krier

unread,
Jul 4, 2016, 3:30:03 AM7/4/16
to tryton
On 2016-07-03 23:40, 'Simon Tapmeyer' via tryton wrote:
> Hello,
>
> thank you for the answer. If I would like to do
> "model.production.on_change_warehouse" where would I look for the code
> which implements it. Could you give me an advice?

All the on_change methods have the same API:

http://doc.tryton.org/4.0/trytond/doc/ref/models/fields.html#ref-models-fields-on-change

but with the RPC definition [1] of RPC(instantiate=0)


[1] http://doc.tryton.org/4.0/trytond/doc/ref/rpc.html?highlight=rpc


PS: Please don't top-post on this mailing list, see
http://groups.tryton.org/netiquette
Reply all
Reply to author
Forward
0 new messages