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_event_registrations_open
| Inputs | Method | Outputs |
|---|---|---|
|
- """Similar to core's :meth:`event_event._compute_event_registrations_open`""" - now = fields.Datetime.now() - for rec in self: - rec.event_registrations_open = ( - rec.event_registrations_started - and (not rec.date_end or rec.date_end >= now) - and (not rec.seats_limited or not rec.seats_max or rec.seats_available) - and ( - not rec.event_ticket_ids - or any(ticket.sale_available for ticket in rec.event_ticket_ids) - ) - ) |
|
