Browse Source

[fix] compact print format not longer ignores format builder

version-14
robert schouten 8 years ago
parent
commit
3c51597aa4
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      frappe/templates/print_formats/standard_macros.html

+ 6
- 2
frappe/templates/print_formats/standard_macros.html View File

@@ -29,8 +29,10 @@
<tr>
<th style="width: 40px" class="table-sr">Sr</th>
{% for tdf in visible_columns %}
{% if data and not data[0].flags.compact_item_print or tdf.fieldname in doc.get(df.fieldname)[0].flags.compact_item_fields %}
<th style="width: {{ get_width(tdf) }};" class="{{ get_align_class(tdf) }}" {{ fieldmeta(df) }}>
{{ _(tdf.label) }}</th>
{% endif %}
{% endfor %}
</tr>
</thead>
@@ -39,8 +41,10 @@
<tr>
<td class="table-sr">{{ d.idx }}</td>
{% for tdf in visible_columns %}
{% if not d.flags.compact_item_print or tdf.fieldname in doc.get(df.fieldname)[0].flags.compact_item_fields %}
<td class="{{ get_align_class(tdf) }}" {{ fieldmeta(df) }}>
<div class="value">{{ print_value(tdf, d, doc) }}</div></td>
<div class="value">{{ print_value(tdf, d, doc, visible_columns) }}</div></td>
{% endif %}
{% endfor %}
</tr>
{% endfor %}
@@ -94,7 +98,7 @@ data-fieldname="{{ df.fieldname }}" data-fieldtype="{{ df.fieldtype }}"
{{ print_value(df, doc) }}
{% endmacro %}

{%- macro print_value(df, doc, parent_doc=None) -%}
{%- macro print_value(df, doc, parent_doc=None, visible_columns=None) -%}
{% if doc.print_templates and
doc.print_templates.get(df.fieldname) %}
{% include doc.print_templates[df.fieldname] %}


Loading…
Cancel
Save