Files
erpnext/erpnext/regional/address_template
Marc Ramser 42479d9a7f feat(regional): Address Template for Germany & Add Switzerland Template (#46737)
* Add Address template for Switzerland

* Fix address template for germany

If an ERPNext instance is set to German and used by a business outside Germany (e.g., in Switzerland or Austria), customer addresses in Germany are displayed in their national format. However, for postal services, the international format (including the country) is required.".

This is just a workaround. IMHO the correct fix would be to check where the company is located and based on that use the national or the international template.

(cherry picked from commit 21b8ad6aa5)
2025-03-31 10:34:00 +00:00
..

To add an Address Template for your country, place a new file in this directory:

  • File name: your_country.html (lower case with underscores)
  • File content: a Jinja Template.

All the fields of Address (including Custom Fields, if any) will be available to the template. Example:

{{ address_line1 }}<br>
{% if address_line2 %}{{ address_line2 }}<br>{% endif -%}
{{ city }}<br>
{% if state %}{{ state }}<br>{% endif -%}
{% if pincode %} PIN:  {{ pincode }}<br>{% endif -%}
{{ country }}<br>
{% if phone %}Phone: {{ phone }}<br>{% endif -%}
{% if fax %}Fax: {{ fax }}<br>{% endif -%}
{% if email_id %}Email: {{ email_id }}<br>{% endif -%}