Try ERPNext Buy Support Partners Foundation

Tree View issue

Hello Guys,
I want to make a tree view for custom doctype and i am having difficulty in creating a tree view. Can anyone tell me steps to make a tree view and also the most imp thing that there is a option in doctype list “is Tree” in version 1 2, what is the purpose of that option ??
Any help will be highly appreciatable

Hi Owais,
pls try below steps
Step 1: You just create your file tree path for example item group(item_group_tree.js) like,
frappe.treeview_settings[‘Item Group’] = {

    onload: function(treeview){


Step 2: Next you import the default tree format path
from frappe.utils.nestedset import NestedSet.

Then your doctype show tree format

Checking Is Tree will implement tree view for that doctype. The system will add lft and rgt fields to the doctype for building the tree along with is_group and parent doctype field.

i created 2 parent enteries in my doctype but tree view is showing only one entry and the other one is not showing… and can you tell me how can i add filter for tree view ??

can you tell me how can i add filter for tree view ??