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.allocation

Compute Method: _compute_hide_accrual_plan_id

View 20.0
Inputs Method Outputs
  • work_entry_type_id
  • work_entry_type_id.id
+ for allocation in self:
+             allocation.hide_accrual_plan_id = allocation.work_entry_type_id and not self.env['hr.leave.accrual.plan'].sudo().search_count([('work_entry_type_id', '=', allocation.work_entry_type_id.id)])
  • hide_accrual_plan_id

Back to entity