code: def genealogic_ids(self):
          
  
          ids = []
          parent = self
  
          while parent:
              ids.append(parent.id)
              parent = parent.parent_object
  
          return ids
docs: Get all genealogic ids
  
              Returns:
                   A list of all parent ids