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_remaining_hours

View 19.0 View 20.0
Inputs Method Outputs
  • allocated_hours
  • effective_hours
  • subtask_effective_hours
  • parent_id
  • project_id
for task in self:
-             if not task.allocated_hours:
+             if not task.allocated_hours and (task.parent_id or task.project_id).allocated_hours <= 0.0:
                task.remaining_hours = 0.0
            else:
                task.remaining_hours = task.allocated_hours - task.effective_hours - task.subtask_effective_hours
  • remaining_hours

Back to entity