From 48bac7f80716c2c49e7906776e5424c08bb6e87a Mon Sep 17 00:00:00 2001 From: Marc Ramser Date: Mon, 31 Mar 2025 10:32:36 +0200 Subject: [PATCH] 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. --- erpnext/regional/address_template/templates/germany.html | 8 ++------ .../regional/address_template/templates/switzerland.html | 4 ++++ 2 files changed, 6 insertions(+), 6 deletions(-) create mode 100644 erpnext/regional/address_template/templates/switzerland.html diff --git a/erpnext/regional/address_template/templates/germany.html b/erpnext/regional/address_template/templates/germany.html index 25c9c9d32e..3886bfadc0 100644 --- a/erpnext/regional/address_template/templates/germany.html +++ b/erpnext/regional/address_template/templates/germany.html @@ -1,8 +1,4 @@ {{ address_line1 }}
{% if address_line2 %}{{ address_line2 }}
{% endif -%} -{% if country in ["Germany", "Deutschland"] %} - {{ pincode }} {{ city }} -{% else %} - {{ pincode }} {{ city | upper }}
- {{ country | upper }} -{% endif %} +{{ pincode }} {{ city | upper }}
+{{ country | upper }} diff --git a/erpnext/regional/address_template/templates/switzerland.html b/erpnext/regional/address_template/templates/switzerland.html new file mode 100644 index 0000000000..3886bfadc0 --- /dev/null +++ b/erpnext/regional/address_template/templates/switzerland.html @@ -0,0 +1,4 @@ +{{ address_line1 }}
+{% if address_line2 %}{{ address_line2 }}
{% endif -%} +{{ pincode }} {{ city | upper }}
+{{ country | upper }} -- GitLab