From 8d16e9fd6d262cc2ffdd367e0c84d6a3ae0681eb Mon Sep 17 00:00:00 2001 From: Anand Doshi <anand@erpnext.com> Date: Tue, 5 Aug 2014 11:39:51 +0530 Subject: [PATCH] [print] convert newlines to <br> based on fieldtype for Text/Small Text --- erpnext/templates/print_formats/includes/item_grid.html | 4 ++-- erpnext/templates/print_formats/includes/taxes.html | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/templates/print_formats/includes/item_grid.html b/erpnext/templates/print_formats/includes/item_grid.html index a51339c516..553d9f84ec 100644 --- a/erpnext/templates/print_formats/includes/item_grid.html +++ b/erpnext/templates/print_formats/includes/item_grid.html @@ -22,12 +22,12 @@ {%- endif %} {% if (not row.meta.is_print_hide("item_name") and (row.meta.is_print_hide("item_code") or row.item_code != row.item_name)) -%} - <div class="primary">{{ row.get_formatted("item_name",as_html=True) }}</div> + <div class="primary">{{ row.get_formatted("item_name") }}</div> {%- endif %} {% if (not row.meta.is_print_hide("description") and row.description and ((row.meta.is_print_hide("item_code") and row.meta.is_print_hide("item_name")) or not (row.item_code == row.item_name == row.description))) -%} - <p>{{ row.get_formatted("description", as_html=True) }}</p> + <p>{{ row.get_formatted("description") }}</p> {%- endif %} {%- for field in visible_columns -%} {%- if (field.fieldname not in std_fields) and diff --git a/erpnext/templates/print_formats/includes/taxes.html b/erpnext/templates/print_formats/includes/taxes.html index 50f9d86a38..bd1e709787 100644 --- a/erpnext/templates/print_formats/includes/taxes.html +++ b/erpnext/templates/print_formats/includes/taxes.html @@ -5,7 +5,7 @@ {%- if not charge.included_in_print_rate -%} <div class="row"> <div class="col-xs-5 text-right"> - <label>{{ charge.get_formatted("description", as_html=True) }}</label></div> + <label>{{ charge.get_formatted("description") }}</label></div> <div class="col-xs-7 text-right"> {{ frappe.format_value(charge.tax_amount / doc.conversion_rate, table_meta.get_field("tax_amount"), doc, currency=doc.currency) }}