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

Module: Maintenance Timesheets

Entity: maintenance.request

Compute Method: _compute_progress_hours

Inputs Method Outputs
for item in self:
            item.progress = 0.0
            if item.planned_hours > 0.0:
                if item.timesheet_total_hours > item.planned_hours:
                    item.progress = 100
                else:
                    item.progress = round(
                        100.0 * item.timesheet_total_hours / item.planned_hours, 2
                    )
            item.remaining_hours = item.planned_hours - item.timesheet_total_hours

Back to entity