Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
5528 Представления

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']),]

Аватар
Отменить
Related Posts Ответы Просмотры Активность
3
июл. 25
4228
Time & Date Issue Решено
6
сент. 19
11551
2
мар. 16
8034
1
янв. 24
12835
0
мар. 15
8315