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

Module: Partner Department

Entity: res.partner

Compute Method: _compute_department_all_member_ids

Inputs Method Outputs
for dept in self:
            sub_depts = self.env["res.partner"].search(
                [("department_id", "=", dept.id), ("type", "=", "department")]
            )
            all_members = dept.department_member_ids
            for sub_dept in sub_depts:
                all_members |= sub_dept.department_member_ids
            dept.department_all_member_ids = all_members

Back to entity