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: github.repository

Compute Method: _compute_team_qty

Inputs Method Outputs
  • id
data = self.env["github.team.repository"].read_group(
            [("repository_id", "in", self.ids)], ["repository_id"], ["repository_id"]
        )
mapping = {
            data["repository_id"][0]: data["repository_id_count"] for data in data
        }
for item in self:
            item.team_qty = mapping.get(item.id, 0)

Back to entity