'User can reset a leave request if it is its own leave request
or if he is an Hr Manager.'

@api.multi
def _compute_can_reset(self):

    user = self.env.user
    group_hr_manager = self.env.ref('hr_holidays.group_hr_holidays_manager')
    for holiday in self:
        if ((group_hr_manager in user.groups_id) or (holiday.employee_id and (holiday.employee_id.user_id == user))):
            holiday.can_reset = True
