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_can_approve
| Inputs | Method | Outputs |
|---|---|---|
|
for allocation in self:
try:
- if allocation.state == 'confirm' and allocation.validation_type != 'no':
+ if allocation.state == 'confirm' and allocation.validation_type == 'both':
+ allocation._check_approval_update('validate1')
+ else:
allocation._check_approval_update('validate')
except (AccessError, UserError):
allocation.can_approve = False
else:
allocation.can_approve = True
|
|
