跳至内容
菜单
此问题已终结

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'])
]
形象
丢弃
相关帖文 回复 查看 活动
4
9月 15
4348
2
1月 20
15228
16
8月 19
10188
1
1月 19
5445
5
6月 18
10844