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

Module: Transport

Entity: tms.order

Compute Method: _compute_duration

Inputs Method Outputs
for record in self:
            if record.date_end and record.date_start:
                difference = record.date_end - record.date_start
                record.duration = difference.total_seconds() / 3600

Back to entity