Accessing the single address- fields in (for example) the customer dataset


im trying to display parts of the customer address in my print template.
I see a field named “address_display” but when i use this it shows all the various fields like Address line 1, line 2, postalcode, hone number etc. But i only want to display certain fields, how can i do that?

Basically i want to access these fields

@Alex_Wolff you will have to create a new address template

You can also load the address in your print template and then use the properties.

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

Thank you for now. It works :smile:

But how do i know the name of the variable to put in? For example in this one:

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

doc.customer_address how do i know that is named like this?

I know this is old and maybe not relevant, but closing the remaining question
how do i know that is named like this?
for completeness of the topic:

open the respective doctype list view, click Menu > Customize and observe the names of the fields.