Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Time Off

Entity: hr.leave

Compute Method: _compute_from_employee_id

View 19.0
Inputs Method Outputs
  • holiday_status_id
  • holiday_status_id.requires_allocation
  • employee_id
  • employee_id.user_id
  • employee_id.id
- for holiday in self:
-             if not holiday.holiday_status_id.requires_allocation:
-                 continue
-             if not holiday.employee_id:
-                 holiday.holiday_status_id = False
-             elif holiday.employee_id.user_id != self.env.user and holiday._origin.employee_id != holiday.employee_id:
-                 if holiday.employee_id and not holiday.holiday_status_id.with_context(employee_id=holiday.employee_id.id).has_valid_allocation:
-                     holiday.holiday_status_id = False
  • holiday_status_id

Back to entity