Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd

In openerp 7 how to validate time field (float data type) to accepts the format only xx:yy if user enter any other format for example 100:00 it not accepts.

In python validation for time fields available. Is there any sample code available to check time (float data type) to accept the format only xx:yy?

    def _my_check_method(self, cr, uid, ids, context=None):
          #Your code goes here
    return True or False

_constraints = [(_my_check_method, 'Your Message', ['your_field']),]

Avatar
Annuleer
Gerelateerde posts Antwoorden Weergaven Activiteit
3
jul. 25
4460
6
sep. 19
11824
2
mrt. 16
8184
1
jan. 24
12992
0
mrt. 15
8499