Accessing inner fields


Am creating my own Print format , type : server

I want to print out the address manually.
So if i was to type {{ doc.address_display }} the address gets printed properly

How do I access the inner field for address. Eg country, city so i can have control over its placement. I tried {{ }} which I realized isn’t correct.


frappe.get_doc("Address", doc.address).city


{% set address = frappe.get_doc("Address", doc.address) %}
{{ }}

How can I access just the city and state of the shipping address? I tried different configurations like and so on but it’s not working. On our PO’s, we need to print only the city and state but not full address.

try this:

{{ frappe.db.get_value("Address", {"name": doc.supplier_address}, "city") }}

Thanks so much! That worked!
I replaced supplier_address with shipping_address since that’s what I needed but it worked great. Thank you again!