콘텐츠로 건너뛰기
메뉴
커뮤니티에 참여하려면 회원 가입을 하시기 바랍니다.
신고된 질문입니다

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

아바타
취소
관련 게시물 답글 화면 활동
Take Users Timezone 해결 완료
3
7월 25
4629
Time & Date Issue 해결 완료
6
9월 19
11963
2
3월 16
8321
1
1월 24
13101
0
3월 15
8689