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_attachment_is_visible
| Inputs | Method | Outputs |
|---|---|---|
|
+ is_privileged_user = self.env.user.has_groups('hr_holidays.group_hr_holidays_user,hr_holidays.group_hr_holidays_manager') + for leave in self: + if leave.work_entry_type_support_document and (is_privileged_user or self.env.uid in (leave.user_id.id, leave.create_uid.id)): + leave.attachment_is_visible = True + else: + leave.attachment_is_visible = False |
|
