Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.
Module: Field Service
Entity: fsm.order
Compute Method: _compute_duration
| Inputs | Method | Outputs |
|---|---|---|
|
+ for rec in self: + duration = 0.0 + if rec.date_start and rec.date_end: + start = fields.Datetime.from_string(rec.date_start) + end = fields.Datetime.from_string(rec.date_end) + delta = end - start + duration = delta.total_seconds() / 3600 + rec.duration = duration |
|
