feat: add hook to allow downstream apps to add auto-loading instrumentation for their doctypes (#28479)
This commit is contained in:
parent
d6eaf15d84
commit
67f2b056b4
2 changed files with 6 additions and 1 deletions
|
|
@ -126,7 +126,9 @@ def get_doc_files(files, start_path):
|
|||
|
||||
files = files or []
|
||||
|
||||
for _module, doctype in IMPORTABLE_DOCTYPES:
|
||||
for _module, doctype in IMPORTABLE_DOCTYPES + [
|
||||
(None, frappe.scrub(dt)) for dt in frappe.get_hooks("importable_doctypes")
|
||||
]:
|
||||
doctype_path = os.path.join(start_path, doctype)
|
||||
if os.path.exists(doctype_path):
|
||||
for docname in os.listdir(doctype_path):
|
||||
|
|
|
|||
|
|
@ -458,6 +458,9 @@ app_license = "{app_license}"
|
|||
# automatically create page for each record of this doctype
|
||||
# website_generators = ["Web Page"]
|
||||
|
||||
# automatically load and sync documents of this doctype from downstream apps
|
||||
# importable_doctypes = [doctype_1]
|
||||
|
||||
# Jinja
|
||||
# ----------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue