Hello,
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
https://docs.erpnext.com/current/models/utilities/address
rmehta
October 16, 2015, 6:16am
#2
@Alex_Wolff you will have to create a new address template
https://manual.erpnext.com/contents/setting-up/print/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) %
2 Likes
Thank you for now. It works
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.
1 Like