Merge pull request #35986 from Shllokkk/tree-fix

feat(doctype): generate controller_tree.js boilerplate for tree doctypes
This commit is contained in:
Ejaaz Khan 2026-01-16 11:02:20 +05:30 committed by GitHub
commit 5bec48fd39
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View file

@ -0,0 +1,5 @@
// Copyright (c) {year}, {app_publisher} and contributors
// For license information, please see license.txt
// frappe.treeview_settings["{doctype}"] = {{
// }};

View file

@ -877,6 +877,9 @@ class DocType(Document):
make_boilerplate("controller.js", self.as_dict())
# make_boilerplate("controller_list.js", self.as_dict())
if self.is_tree:
make_boilerplate("controller_tree.js", self.as_dict())
if self.has_web_view:
templates_path = frappe.get_module_path(
frappe.scrub(self.module), "doctype", frappe.scrub(self.name), "templates"