{% from "templates/autodoc/macros.html" import automodule, version, source_link, doctype_link %} {% set doc = frappe.get_doc("DocType", doctype) %} {% set controller = autodoc.get_controller(doctype) %}

{{ doctype }}

{{ version(doctype) }} {{ source_link(app, app.name + "/" + scrub(doc.module) + "/doctype/" + scrub(doctype), True) }}
{% if doc.issingle %}Single{% endif %} {% if doc.istable %}Child Table{% endif %} {% if not doc.issingle %}

Table Name: tab{{ doctype }}

{% endif %} {{ doc.description or "" }}

Fields

{% for df in doc.fields %} {% endfor %}
Sr Fieldname Type Label Options
{{ loop.index }} {{ df.fieldname }} {{ df.fieldtype }} {{ df.label or "" }} {% if df.description %}

{{ df.description }}

{% endif %}
{% if df.options and df.fieldtype not in ("HTML") %} {% if df.fieldtype in ("Table", "Link") %} {{ doctype_link(app, df.options) }} {% else %}
{{ df.options }}
{% endif %} {% endif %}
{% if not doc.istable %}

Controller

{{ controller.__module__ }}

{{ automodule(controller.__module__) }} {% set parents = frappe.get_list("DocField", filters = {"options": doctype, "fieldtype": "Link"}, fields = ["distinct parent"], order_by="parent asc") %} {% if parents %}

Linked In:

{% endif %} {% else %} {% set parents = frappe.get_list("DocField", filters = {"options": doctype, "fieldtype": "Table"}, fields = ["distinct parent"], order_by="parent asc") %} {% if parents %}

Child Table Of

{% endif %} {% endif %}