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

Module: MRP Project

Entity: project.project

Compute Method: _compute_production_count

Inputs Method Outputs
production_count_per_project = dict(
            self.env['mrp.production']._read_group(
                [('project_id', 'in', self.ids)],
                ['project_id'], ['__count']
            )
        )
for project in self:
            project.production_count = production_count_per_project.get(project)

Back to entity