On 2018-08-07 00:50, Javier Uribe wrote:
> Hello, I'm developing a Framework to develop mobile tryton apps so I have to 
> comunicate the client mobile with the server. I used the rpc method 
> fields_get and default to fill the field's definitions but I'm struggling to 
> understand how Tryton fills the fields.function, because the fields_get 
> doesn't give you the info about it neither it is a fields.function or its 
> function to call, so this field remains empty if I don't fill it manually.

This is done on purpose. Function fields is a server details. They
must behave like the field they impersonate. So you must not know the
getter, setter or searcher because you can not call them remotely. You
must just use the read/create/write API as for any other fields.

> When it comes to read a record it is easy because the read rpc method gives 
> you the value, the problem comes when I have to create a new record and I 
> have to fill it with all the default_values but I can't fill the function 
> fields with its values.

You should but be careful that some function fields have no setter so
they are described as readonly. You should never send value for readonly
fields. We will one day enforce this https://bugs.tryton.org/issue4207

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

-- 
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/20180807081013.hvw7vy5y4txv47kb%40kei.

Reply via email to