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

Module: Discuss

Entity: discuss.call.history

Compute Method: _compute_duration_hour

View 20.0
Inputs Method Outputs
  • end_dt
  • start_dt
+ for record in self:
+             end_dt = record.end_dt or fields.Datetime.now()
+             record.duration_hour = (end_dt - record.start_dt).total_seconds() / 3600
  • duration_hour

Back to entity