4.1 KiB
4.1 KiB
Version 6.x.x
<a class="btn btn-default btn-sm" href="https://github.com/frappe/erpnext/tree/develop/erpnext/utilities/doctype/address_template"
target="_blank" style="margin-left: 10px; margin-bottom: 10px;"><i class="octicon octicon-mark-github"></i> Source</a>
<p><b>Table Name:</b> <code>tabAddress Template</code></p>
Fields
<tr >
<td>1</td>
<td class="danger" title="Mandatory"><code>country</code></td>
<td >
Link</td>
<td >
Country
</td>
<td>
</td>
</tr>
<tr >
<td>2</td>
<td ><code>is_default</code></td>
<td >
Check</td>
<td >
Is Default
<p class="text-muted small">
This format is used if country specific format is not found</p>
</td>
<td></td>
</tr>
<tr >
<td>3</td>
<td ><code>template</code></td>
<td >
Code</td>
<td >
Template
<p class="text-muted small">
<h4>Default Template</h4>
Uses Jinja Templating and all the fields of Address (including Custom Fields if any) will be available
{{ 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 -%}
</tbody>
Sr | Fieldname | Type | Label | Options |
---|---|---|---|---|
<hr>
<h3>Controller</h3>
<h4>erpnext.utilities.doctype.address_template.address_template</h4>
<h3 style="font-weight: normal;">Class <b>AddressTemplate</b></h3>
<p style="padding-left: 30px;"><i>Inherits from frappe.model.document.Document</i></h4>
<div class="docs-attr-desc"><p></p>
<p class="docs-attr-name">
<a name="on_trash" href="#on_trash" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
<b>on_trash</b>
<i class="text-muted">(self)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
<p class="docs-attr-name">
<a name="on_update" href="#on_update" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
<b>on_update</b>
<i class="text-muted">(self)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
<p class="docs-attr-name">
<a name="validate" href="#validate" class="text-muted small">
<i class="icon-link small" style="color: #ccc;"></i></a>
<b>validate</b>
<i class="text-muted">(self)</i>
</p>
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
</div>
<hr>