create a variable like this and assign the doctype u need
{% set c = frappe.get_doc(“Doctype name”, data) %}
like this u can fetch the data
{{ c.data }}
in the feild of the data an doctype name give your data and docctype name
{{frappe.db.get_value(“Address”, doc.customer_address, “address_line1”) or ‘’}}
{{frappe.db.get_value(“Address”, doc.customer_address, “address_line2”) or ‘’}}
{{frappe.db.get_value(“Address”, doc.customer_address, “city”) or ‘’}}
{{frappe.db.get_value(“Address”, doc.customer_address, “state”) or ‘’}}-
{{frappe.db.get_value(“Address”, doc.customer_address, “pincode”) or ‘’}}
{{frappe.db.get_value(“Address”, doc.customer_address, “country”) or ‘’}}