Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
5679 มุมมอง

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
4534
Time & Date Issue แก้ไขแล้ว
6
ก.ย. 19
11879
2
มี.ค. 16
8259
Datetime and Time Zones - OpenERP 7 แก้ไขแล้ว
1
ม.ค. 24
13047
0
มี.ค. 15
8610