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

Module: Event Meeting / Rooms

Entity: event.event

Compute Method: _compute_meeting_room_count

Inputs Method Outputs
  • id
meeting_room_count = self.env["event.meeting.room"].sudo()._read_group(
            domain=[("event_id", "in", self.ids)],
            groupby=['event_id'],
            aggregates=['__count'],
        )
meeting_room_count = {
            event.id: count
            for event, count in meeting_room_count
        }
for event in self:
            event.meeting_room_count = meeting_room_count.get(event.id, 0)

Back to entity