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

Module: Recruitment

Entity: hr.talent.pool

Compute Method: _compute_talent_count

Inputs Method Outputs
  • id
talents = self.env["hr.applicant"]._read_group(
            domain=[("talent_pool_ids", "in", self.ids)], groupby=["talent_pool_ids"], aggregates=["__count"]
        )
talent_data = {talent_pool.id: count for talent_pool, count in talents}
for pool in self:
            pool.no_of_talents = talent_data.get(pool.id, 0)

Back to entity