validation

16 views
Skip to first unread message

Cato Nano

unread,
Jan 26, 2018, 4:58:28 AM1/26/18
to tryton
One of my fields can contain values that are in a certain range only

And such range depends on the content of another field

If the user inserts a value that is out of that range, then the record shouldn't be saved.

How do I achieve this ?

Sergi Almacellas Abellana

unread,
Jan 26, 2018, 5:01:57 AM1/26/18
to try...@googlegroups.com
El 26/01/18 a les 10:58, Cato Nano ha escrit:
You can use a domain with which evaluates the value of the other field
using Eval.

Here is an example which compares that start_date is before end_date:

http://hg.tryton.org/modules/account/file/6cf1d34490c0/fiscalyear.py#l27

Hope it helps.


--
Sergi Almacellas Abellana
www.koolpi.com
Twitter: @pokoli_srk

Cato Nano

unread,
Jan 28, 2018, 5:41:34 AM1/28/18
to tryton
yes Sergi, that helps. Thank you so much
Reply all
Reply to author
Forward
0 new messages