Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: Test - Base Automation

Entity: test_base_automation.task

Compute Method: _compute_effective_hours

View 19.0 View 20.0
Inputs Method Outputs
  • trigger_hours
  • project_id
for task in self:
-             task.effective_hours = task.trigger_hours
+             # reading 'project_id' nests its computation inside this one
+             task.effective_hours = task.trigger_hours if task.project_id else 0.0
  • effective_hours

Back to entity