Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Task Logs
Entity: project.task
Compute Method: _compute_progress_hours
| Inputs | Method | Outputs |
|---|---|---|
|
for task in self:
if (task.allocated_hours > 0.0):
task_total_hours = task.effective_hours + task.subtask_effective_hours
task.overtime = max(task_total_hours - task.allocated_hours, 0)
- task.progress = round(100.0 * task_total_hours / task.allocated_hours, 2)
+ task.progress = round(task_total_hours / task.allocated_hours, 2)
else:
task.progress = 0.0
task.overtime = 0
|
|
