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

Module: Privacy - Consent

Entity: privacy.activity

Compute Method: _compute_consent_count

Inputs Method Outputs
self.consent_count = 0
groups = self.env["privacy.consent"].read_group(
            [("activity_id", "in", self.ids)],
            ["activity_id"],
            ["activity_id"],
        )
for group in groups:
            self.browse(group["activity_id"][0]).consent_count = group[
                "activity_id_count"
            ]

Back to entity