Access Doc object for Custom print format (Quotation)

Hey I’m learning ERP next, installed ErpNext on a local site.

I have created a custom print format for Quotation everything is dynamic except for 2 things,

  1. Address (Bill and ship address) - how to know about the Doc type object so that I can access those address.
  2. GST - I have a column of items (products), Now how can I show GST (which might be different for all products) dynamically ?

{{ doc.address_display }} Billing
{{ doc.shipping_address }} Shipping

GST
{% for item in doc.items %}
{% if item.item_tax_template %}
{% set t = frappe.get_doc(“Item Tax Template”, item.item_tax_template) %}
{% for tax in t.taxes %}
{{ tax.tax_type }}: {{ tax.tax_rate }}%
{% endfor %}
{% endif %}
{% endfor %}

you can try this code.

Ok Thank you, But how can I would know that I need to fetch exactly what for a field (e.g ‘address_display’) from doc object ?

Also for what do i need for current user’s Name (name of the person logged in)
Prepared By: {{ frappe.session.user }}
I guess this was giving Name (Administrator) earlier , but now getting this→ Prepared By: ritik@email.com

While I’m still the Administrator and this is giving my email instead of name

  1. To find field names Open Quotation form > Customize Form, every field shows its fieldname.

  2. For full name instead of email → frappe.session.user gives email ID. Use this instead:
    {{ frappe.utils.get_fullname(frappe.session.user) }}