From d8c826ff1937eb80495f8c5e292bbed5e933ffbb Mon Sep 17 00:00:00 2001 From: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com> Date: Mon, 20 Jan 2020 16:18:46 +0530 Subject: [PATCH] fix: Small Text should not be rendered as text_field (#9318) --- frappe/templates/print_formats/standard_macros.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappe/templates/print_formats/standard_macros.html b/frappe/templates/print_formats/standard_macros.html index 45228587f8..f879dd7e08 100644 --- a/frappe/templates/print_formats/standard_macros.html +++ b/frappe/templates/print_formats/standard_macros.html @@ -3,7 +3,7 @@ {{ render_table(df, doc) }} {%- elif df.fieldtype=="HTML" and df.options -%}
{{ frappe.render_template(df.options, {"doc": doc}) or "" }}
- {%- elif df.fieldtype in ("Text", "Text Editor", "Code", "Small Text", "Long Text") -%} + {%- elif df.fieldtype in ("Text", "Text Editor", "Code", "Long Text") -%} {{ render_text_field(df, doc) }} {%- elif df.fieldtype in ("Image", "Attach Image", "Attach") and (guess_mimetype(doc[df.fieldname])[0] or "").startswith("image/") -%} @@ -95,7 +95,7 @@ data-fieldname="{{ df.fieldname }}" data-fieldtype="{{ df.fieldtype }}" {%- macro render_text_field(df, doc) -%} {%- if doc.get(df.fieldname) != None -%}
- {%- if df.fieldtype in ("Text", "Code") %}{%- endif %} + {%- if df.fieldtype in ("Text", "Code", "Long Text") %}{%- endif %} {%- if df.fieldtype=="Code" %}
{{ doc.get(df.fieldname) }}
{% else -%}