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

Module: Resource booking

Entity: resource.booking.combination

Compute Method: _compute_booking_count

Inputs Method Outputs
booking_data = dict(
            self.env["resource.booking"]._read_group(
                [("combination_id", "in", self.ids)], ["combination_id"], ["__count"]
            )
        )
for combination in self:
            combination.booking_count = booking_data.get(combination, 0)

Back to entity