El 24/11/17 a les 11:15, Maxime Richez ha escrit:
Hi,
We are looking to define a specific rule on a button (Models-> Models Access ->
Buttons). Rule would be : 2 users needs to validate button if amount is greater than
a specific value.
We try this expression : [["total_amount", ">", 500]] > This is not working.
What should be the correct expression ?
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.
--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk
--
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/ed8ab58c-9215-e20b-8d66-f1160575b649%40koolpi.com.