Sunday, October 12, 2025
1 change · saas-18.4
Resolved issues and error corrections
Hierarchy views now better handle circular relationships, such as an employee being set as their own manager. This prevents crashes and endless loading when viewing organization charts or other hierarchical data.
Original PR description
This commit fixes some traceback errors in the web_hierarchy module by refining the cycle detection of records in hierarchies. Infinite loops in case of a cycle's presence in the `removeChildNodes` and `processNode` methods are now prevented. Additionally, tree re-rooting in case of the presence of two nodes in the same tree, which implies a cycle's existence, is now avoided. There was an edge case where an employee could be their own manager, creating two child nodes of that employee. The case is now handled by making sure that records are unique for each parent ID in the `recordsPerParentId` object. task-5022670 --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr Forward-Port-Of: odoo/odoo#231040 Forward-Port-Of: odoo/odoo#228976