Tree of two doctypes

Hi all,
How can I customize tree building feature in frappe to be able to deal with two doctypes?


If you need to create a DocType with Tree structure you need to have these fields
lft, rgt, old_parent, is_group, parent_{doctype}

Also, your Doctype controller should extend from NestedSet

Thanks @netchampfaris,
I already do that, but now I want to build a tree of two doctypes, is the frappe structure of tree allow that?

I am not sure what “tow doctypes” mean. Can you explain in detail?


I meant that if I can build a tree that links to tow tables,
For example here frappe.treeview_settings[“Account”] , the tree was building with just one table, and I want to use the same way to implement a tree with two tables.

Hi @netchampfaris

I suspect he means “two doctypes”


@wale That is :sweat_smile:
Sorry for the wrong spelling!

1 Like