Skip to main content

Address Template in ERPNext (Detailed Guide)

An Address Template in ERPNext allows you to define region-specific address formats for documents such as Quotations, Sales Invoices, Purchase Invoices, and other print formats.

Different countries follow different address structures, and Address Templates ensure that ERPNext adapts to these variations automatically.

1. Overview of Address Templates

Each region has its own way of formatting addresses. For example, the United States uses fields like County and ZIP Code, while other countries may not.

ERPNext allows you to create country-wise address templates to handle these differences in print formats and document displays.

A default Address Template is created during system setup and applies to all countries that do not have a specific template defined.

2. Accessing Address Templates

To open Address Templates, navigate to:

CRM > Address Template

3. How Address Templates Work

The Address Template system checks the Country field in the Address master and applies the corresponding template automatically.

This ensures that:
– Address formats are region-specific
– Print formats remain consistent
– Documents reflect local formatting standards

For example:
– In the United States, fields like County and ZIP Code can be displayed
– In other countries, these fields may be hidden or replaced

4. Creating an Address Template

To create a new Address Template in ERPNext:

  1. Go to the Address Template list and click Add Address Template.
  2. Select the Country for which the template applies.
  3. Customize the layout using CSS and Jinja if required.
  4. Mark it as Default if it should be used for all unmatched countries.
  5. Click Save.

5. Key Features of Address Template

5.1 Country-Based Formatting

Address Templates allow you to define different address layouts for different countries, ensuring compliance with regional standards.

5.2 Customizable Fields

You can modify how fields are displayed, including:
– PIN Code → ZIP Code
– County
– State / Region formats

All fields (including Custom Fields) are available for use in templates.

5.3 Jinja-Based Template Engine

ERPNext uses Jinja templating combined with HTML for rendering address formats.

This allows flexible customization of:
– Layout structure
– Field display logic
– Print formatting

5.4 Default Template Fallback

If no country-specific template exists, ERPNext automatically uses the default Address Template.

This ensures consistent formatting across the system.

6. Summary

Address Templates in ERPNext provide a flexible way to manage region-specific address formats using Jinja and HTML. They ensure that documents comply with local standards and display addresses correctly across different countries.

7. Related Topics

  1. Terms and Conditions Template
  2. Cheque Print Template
Rating: 0 / 5 (0 votes)