El martes, 7 de agosto de 2018, 13:40:05 (UTC+2), Cédric Krier  escribió:
> On 2018-08-07 03:57, Javier Uribe wrote:
> > Ah ok, I think I understand now. So if the field function does not have a 
> > on_change as a getter, for example, a field moves which has as a getter 
> > get_moves(). This methos will not be trigger when creating a record, will 
> > it? 
> 
> No, the getter are only called when reading records.
> 
> > So I only have to care to trigger on_change and on_change with causing that 
> > the fields function which has this on_change as getter will be filled. 
> > 
> > My only doubt then is with these cases in which the field does not have an 
> > on_change method as a getter, and during the process of creating a record I 
> > want to use this field. Because if i'm not wrong, on Tryton if i'm creating 
> > a record and I print moves (using the same example), this will trigger 
> > get_moves. How does Tryton client get this value?
> 
> The print action will save the record before being launched.
> 
> -- 
I see, therefore, I only have to call all the on_change and on_change_with 
during the creation of a record, because these will call all the field 
functions needed. The other fields.function which does not have on_change are 
not to be invoked until they are not in a read record. 

The only thing that I think it wouldn't work is the domain/states because what 
if there is a domain/state which mentions an Eval(fieldFUnction), so I have to 
have it on my context but I can't because I can't read a field.function (which 
does not have an on change getter). So the states makes my field invisible for 
example when creating a record. How do I put in my context these fields?

-- 
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/565aa2b9-f54c-4a6f-8916-dd45b44b734e%40googlegroups.com.

Reply via email to