> You have some examples in the test suite:
> 
> http://hg.tryton.org/trytond/file/34073513c887/trytond/tests/test_modelview.py#l194
> 
> Have you tried?:
> 
> Eval('self', {}).get('total_amount', 0) > 500
> 
> Hope it helps.

Thanks but we are testing from the tryton client, and expression is not a valid 
Pyson expression. Is there a way to convert your expression  in the gui client ?
We convert your expression with PYTHONEncoder and then we introduce the result 
in the GUI, and it's working whith this value:
{"s2": 500, "s1": {"d": 0, "k": "total_amount", "__class__": "Get", "v": {"d": 
{}, "__class__": "Eval", "v": "self"}}, "e": false, "__class__": "Greater"}

Is there a tool in the gui to convert expression to Pyson ?


-- 
You received this message because you are subscribed to the Google Groups 
"tryton-dev" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton-dev/658b2066-7dde-4cee-a835-db279ca87291%40googlegroups.com.

Reply via email to