seitime-frappe/frappe/templates/print_format/macros/FieldTemplate.html
Faris Ansari 76b5ee8b9e feat: Field Templates
- standard field templates for rendering custom templates for fields for e.g., taxes in invoice
- ability to create user defined reusable templates that show up in print format builder
2021-10-19 19:12:15 +05:30

4 lines
321 B
HTML

<div class="field-template" {{ field_attributes(df) }}>
{% set template = frappe.db.get_value('Print Format Field Template', df.field_template, ['template', 'template_file', 'standard'], as_dict=1) %}
{{ frappe.render_template(template.template_file if template.standard else template.template, {'doc': doc}) }}
</div>