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

Module: Github Connector

Entity: res.partner

Compute Method: _compute_github_team_qty

Inputs Method Outputs
  • id
data = self.env["github.team.partner"].read_group(
            [("partner_id", "in", self.ids)], ["partner_id"], ["partner_id"]
        )
mapping = {data["partner_id"][0]: data["partner_id_count"] for data in data}
for item in self:
            item.github_team_qty = mapping.get(item.id, 0)

Back to entity