brotherton-erpnext/erpnext/docs/current/models/utilities/address_template.html

175 lines
4.1 KiB
HTML
Raw Normal View History

2015-12-03 12:58:19 +00:00
<!-- title: Address Template -->
<div class="dev-header">
<a class="btn btn-default btn-sm" disabled style="margin-bottom: 10px;">
Version 6.x.x</a>
<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>
</div>
<p><b>Table Name:</b> <code>tabAddress Template</code></p>
<h3>Fields</h3>
<table class="table table-bordered" style="table-layout: fixed;">
<thead>
<tr>
<th style="width: 5%">Sr</th>
<th style="width: 25%">Fieldname</th>
<th style="width: 20%">Type</th>
<th style="width: 25%">Label</th>
<th style="width: 25%">Options</th>
</tr>
</thead>
<tbody>
<tr >
<td>1</td>
<td class="danger" title="Mandatory"><code>country</code></td>
<td >
Link</td>
<td >
Country
</td>
<td>
<a href="https://frappe.github.io/erpnext/current/models/geo/country">Country</a>
</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>
<p>Uses <a href="http://jinja.pocoo.org/docs/templates/">Jinja Templating</a> and all the fields of Address (including Custom Fields if any) will be available</p>
<pre><code>{{ address_line1 }}&lt;br&gt;
{% if address_line2 %}{{ address_line2 }}&lt;br&gt;{% endif -%}
{{ city }}&lt;br&gt;
{% if state %}{{ state }}&lt;br&gt;{% endif -%}
{% if pincode %} PIN: {{ pincode }}&lt;br&gt;{% endif -%}
{{ country }}&lt;br&gt;
{% if phone %}Phone: {{ phone }}&lt;br&gt;{% endif -%}
{% if fax %}Fax: {{ fax }}&lt;br&gt;{% endif -%}
{% if email_id %}Email: {{ email_id }}&lt;br&gt;{% endif -%}
</code></pre></p>
</td>
<td></td>
</tr>
</tbody>
</table>
<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>
</div>
<div style="padding-left: 30px;">
<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>
</div>
<br>
<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>
</div>
<br>
<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>
<br>
</div>
<hr>
<!-- autodoc -->
<!-- jinja -->
<!-- static -->