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

Module: Events Organization

Entity: event.slot

Compute Method: _compute_datetimes

Inputs Method Outputs
for slot in self:
            event_tz = pytz.timezone(slot.date_tz)
            start = datetime.combine(slot.date, float_to_time(slot.start_hour))
            end = datetime.combine(slot.date, float_to_time(slot.end_hour))
            slot.start_datetime = event_tz.localize(start).astimezone(pytz.UTC).replace(tzinfo=None)
            slot.end_datetime = event_tz.localize(end).astimezone(pytz.UTC).replace(tzinfo=None)

Back to entity