El martes, 7 de agosto de 2018, 11:55:06 (UTC+2), Cédric Krier escribió: > On 2018-08-07 02:02, Javier Uribe wrote: > > El martes, 7 de agosto de 2018, 11:00:06 (UTC+2), Cédric Krier escribió: > > > On 2018-08-07 01:26, Javier Uribe wrote: > > > > So, lets say for instance that we have a field moves which is a > > > > Fields.function which has a method get_moves(). And I have just created > > > > a record that has this field, the fields_get tells me that it is a > > > > readonly. How should I fill the field moves with its value? > > > > > > Like any other field with the value read. > > > > So, can I read a field of a record that doesn't exist yet?, if that so, > > that's my problem I haven't seen how to do that. > > Of course, you can not read a record that does not exist. > I was answering about the creation like you said in your previous > message. > > But the default value of a readonly field is just like the default value > of any field. But you must not send the value of readonly field to the > server for creation. > > > -- > Cédric Krier - B2CK SPRL > Email/Jabber: [email protected] > Tel: +32 472 54 46 59 > Website: http://www.b2ck.com/
First of all, thanks a lot for your time but I still don't get how to do what I want. I want to read a field function of a record that doesn't exist because I'm creating, so basically when i'm creating a record and it is not saved on the server I only have the default values, but the function fields I understand that the must be filled as well. So what I want is to populate the model with the default values and the function fields. The default_values can be read easily using the RPC method default_get, however the function fields cannot be read from a record that does not exist. Thank you again. -- 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/003ee282-cade-464d-9e36-1461271f7f43%40googlegroups.com.
