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

Module: Event Sessions

Entity: event.session

Compute Method: _compute_is_finished

View 18.0
Inputs Method Outputs
  • date_end
- """Similar to core's :meth:`event_event._compute_is_finished`"""
- for rec in self:
-             if not rec.date_end:
-                 rec.is_finished = False
-                 continue
-             rec = rec._set_tz_context()
-             current_datetime = fields.Datetime.context_timestamp(
-                 rec, fields.Datetime.now()
-             )
-             datetime_end = fields.Datetime.context_timestamp(rec, rec.date_end)
-             rec.is_finished = datetime_end <= current_datetime
  • is_finished

Back to entity