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.employee.base

Compute Method: _compute_show_leaves

View 17.0 View 18.0
Inputs Method Outputs
  • user_id
- show_leaves = self.env['res.users'].has_group('hr_holidays.group_hr_holidays_user')
+ show_leaves = self.env.user.has_group('hr_holidays.group_hr_holidays_user')
for employee in self:
            if show_leaves or employee.user_id == self.env.user:
                employee.show_leaves = True
            else:
                employee.show_leaves = False
  • show_leaves

Back to entity