Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
5661 Переглядів

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 Відповіді Переглядів Дія
Take Users Timezone Вирішено
3
лип. 25
4484
Time & Date Issue Вирішено
6
вер. 19
11842
2
бер. 16
8202
1
січ. 24
13006
0
бер. 15
8518