tree: 84ce7c8c81601c80fafcd4c4cefc9106a9af152c [path history] [tgz]
  1. templates/
  2. __init__.py
  3. README.md
  4. setup.py
  5. test_regional_address_template.py
erpnext/regional/address_template/README.md

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 -%}