Skip to content

Commit 27aee47

Browse files
fix: Headings and line breaks not seen in print formats
1 parent cc32b53 commit 27aee47

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

frappe/templates/print_formats/standard.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@
2020
</div>
2121
{% endif %}
2222

23-
{% for section in page %}
23+
{% for section in page %}
2424
<div class="row section-break">
25-
{%- if doc._line_breaks and loop.index != 1 -%}<hr>{%- endif -%}
26-
{%- if doc._show_section_headings and section.label and section.has_data -%}
25+
{%- if doc.line_breaks and loop.index != 1 -%}<hr>{%- endif -%}
26+
{%- if doc.show_section_headings and section.label and section.has_data -%}
2727
<h4 class='col-sm-12'>{{ _(section.label) }}</h4>
2828
{%- endif -%}
2929
{% for column in section.columns %}

frappe/templates/print_formats/standard_macros.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@
7171
{%- macro render_field_with_label(df, doc) -%}
7272
<div class="row {% if df.bold %}important{% endif %} data-field" {{ fieldmeta(df) }}>
7373
<div class="col-xs-{{ "9" if df.fieldtype=="Check" else "5" }}
74-
{%- if doc._align_labels_right %} text-right{%- endif -%}">
74+
{%- if doc.align_labels_right %} text-right{%- endif -%}">
7575

7676
{% if df.fieldtype not in ("Image","HTML","Check") and
7777
doc.get(df.fieldname) != None %}

frappe/www/printview.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ def get_html(doc, name=None, print_format=None, meta=None,
9696

9797
# determine template
9898
if print_format:
99-
doc._show_section_headings = print_format.show_section_headings
100-
doc._line_breaks = print_format.line_breaks
101-
doc._align_labels_right = print_format.align_labels_right
99+
doc.show_section_headings = print_format.show_section_headings
100+
doc.line_breaks = print_format.line_breaks
101+
doc.align_labels_right = print_format.align_labels_right
102102

103103
def get_template_from_string():
104104
return jenv.from_string(get_print_format(doc.doctype,

0 commit comments

Comments
 (0)