Skip to content
  • Joren Van Onder's avatar
    [FIX] hr_payroll: avoid infinite recursion · be48a140
    Joren Van Onder authored
    The get_recursive_parent function seemingly depended on the ordering of
    the rule_categories recordset which happens to work fine in most cases
    because all data first defines the parent before defining the children
    rule categories. But if you happen to do it the other way around it
    won't work and it will infinitely call itself because:
    
    if rule_categories[0].parent_id:
        rule_categories = rule_categories[0].parent_id | rule_categories
    
    won't change the value of rule_categories[0].
    
    opw-673222 (loosely related)
    be48a140