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

Module: Helpdesk Ticket Timesheet

Entity: helpdesk.ticket

Compute Method: _compute_progress_hours

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

Back to entity