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

Module: Link partner to events

Entity: res.partner

Compute Method: _compute_registration_count

Inputs Method Outputs
  • id
for partner in self:
            partner.registration_count = self.env["event.registration"].search_count(
                [
                    ("attendee_partner_id", "child_of", partner.id),
                    ("state", "not in", ("cancel", "draft")),
                ]
            )

Back to entity