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

In odoo 8 , while creating or editing contract Date of joining field(date_start) throws this validation error.Even after I given correct value.

def _check_dates(self, cr, uid, ids, context=None):
    for contract in self.read(cr, uid, ids, ['date_start', 'date_end'], context=context):
         if contract['date_start'] and contract['date_end'] and contract['date_start'] > contract['date_end']:
             return False
    return True

_constraints = [
    (_check_dates, 'Error! Contract start-date must be less than contract end-date.', ['date_start', 'date_end'])
]
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Datetime Constarints แก้ไขแล้ว
4
ก.ย. 15
4344
2
ม.ค. 20
15221
16
ส.ค. 19
10183
1
ม.ค. 19
5439
5
มิ.ย. 18
10842