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.event

Compute Method: _compute_start_sale_date

Inputs Method Outputs
""" Compute the start sale date of an event. Currently lowest starting sale
        date of tickets if they are used, of False. """
for event in self:
            start_dates = [ticket.start_sale_datetime for ticket in event.event_ticket_ids if not ticket.is_expired]
            event.start_sale_datetime = min(start_dates) if start_dates and all(start_dates) else False

Back to entity