Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie

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'])
]
Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
4
wrz 15
4348
2
sty 20
15236
16
sie 19
10205
1
sty 19
5457
5
cze 18
10859