Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
5533 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
Take Users Timezone Đã xử lý
3
thg 7 25
4238
Time & Date Issue Đã xử lý
6
thg 9 19
11564
2
thg 3 16
8037
1
thg 1 24
12836
0
thg 3 15
8319