result = True
contracts = env['hr.contract'].search_count([('employee_id','=',record.employee_id.id),('is_last_hire_employee_info','=',True),('contract_agreement_category','=','labor_contract'),('state', '=', 'done')])
if contracts and record.contract_total_count - contracts > 1:
result = False