[minor] add translated get_formatted

This commit is contained in:
Rushabh Mehta
2016-03-03 10:48:45 +05:30
parent 69cfab8559
commit 07263462f6

View File

@@ -19,7 +19,7 @@
{% if (doc.in_format_data("item_name") and not doc.is_print_hide("item_name") and {% if (doc.in_format_data("item_name") and not doc.is_print_hide("item_name") and
(not doc.in_format_data("item_code") or doc.is_print_hide("item_code") (not doc.in_format_data("item_code") or doc.is_print_hide("item_code")
or doc.item_code != doc.item_name)) -%} or doc.item_code != doc.item_name)) -%}
<div class="primary">{{ _(doc.get_formatted("item_name")) }}</div> <div class="primary">{{ doc.get_formatted("item_name", translated=True) }}</div>
{%- endif %} {%- endif %}
{% if (doc.in_format_data("description") and doc.description and {% if (doc.in_format_data("description") and doc.description and
@@ -30,7 +30,7 @@
) or not (doc.item_code == doc.item_name == doc.description) ) or not (doc.item_code == doc.item_name == doc.description)
)) ))
-%} -%}
<p>{{ _(doc.get_formatted("description")) }}</p> <p>{{ doc.get_formatted("description", translated=True) }}</p>
{%- endif %} {%- endif %}
{% if compact -%} {% if compact -%}
@@ -38,7 +38,7 @@
{% if doc.get(fieldname) -%} {% if doc.get(fieldname) -%}
<p> <p>
<strong>{{ _(doc.meta.get_label(fieldname)) }}:</strong> <strong>{{ _(doc.meta.get_label(fieldname)) }}:</strong>
{{ _(doc.get_formatted(fieldname)) }} {{ doc.get_formatted(fieldname, translated=True) }}
</p> </p>
{% endif %} {% endif %}
{%- endfor -%} {%- endfor -%}