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

Module: Base

Entity: res.company

Compute Method: _compute_parent_ids

View 19.0
Inputs Method Outputs
  • parent_path
  • parent_ids
- for company in self.with_context(active_test=False):
-             company.parent_ids = self.browse(int(id) for id in company.parent_path.split('/') if id) if company.parent_path else company
-             company.root_id = company.parent_ids[0]
  • parent_ids
  • root_id

Back to entity