Version 6.x.x Source

Class NestedSet

Inherits from frappe.model.document.Document

after_rename (self, olddn, newdn, merge=False)

No docs


before_rename (self, olddn, newdn, merge=False, group_fname=is_group)

No docs


get_ancestors (self)

No docs


on_trash (self)

No docs


on_update (self)

No docs


validate_ledger (self, group_identifier=is_group)

No docs


validate_one_root (self)

No docs



Class NestedSetChildExistsError

Inherits from frappe.exceptions.ValidationError


Class NestedSetInvalidMergeError

Inherits from frappe.exceptions.ValidationError


Class NestedSetMultipleRootsError

Inherits from frappe.exceptions.ValidationError


Class NestedSetRecursionError

Inherits from frappe.exceptions.ValidationError


frappe.utils.nestedset.get_ancestors_of (doctype, name)

Get ancestor elements of a DocType with a tree structure


frappe.utils.nestedset.get_root_of (doctype)

Get root element of a DocType with a tree structure


frappe.utils.nestedset.rebuild_node (doctype, parent, left, parent_field)

reset lft, rgt and recursive call for all children


frappe.utils.nestedset.rebuild_tree (doctype, parent_field)

call rebuild_node for all root nodes


frappe.utils.nestedset.update_add_node (doc, parent, parent_field)

insert a new node


frappe.utils.nestedset.update_move_node (doc, parent_field)

No docs


frappe.utils.nestedset.update_nsm (doc)

No docs


frappe.utils.nestedset.validate_loop (doctype, name, lft, rgt)

check if item not an ancestor (loop)