Print Format Builder - Customizing Items Table (v5)

When using the Print Format Builder is there a way to customize how the Items Table prints out?

I have found the Edit Columns button/function, but that doesn’t do what I’m wanting to do. We have a specific format that we’re trying to get, rather than the information be in columns in the printout we want something like:

1st Assistant, 2 Hours @ $150.00 … $300.00
(description if required)
2nd Assistant, 3 Hours @ $100.00 … $300.00
3rd Assistant, 3 Hours @ $75.00 … $225.00

Where the subtotal for the line item is the only thing that is lined up on the column.

Build the table using Jinja {% for %}

You can loop over doc.items property to get

I have a similar issue and would like to use custom HTML in the table section in the Print Format Builder . Can you share some sample code of how this was acheived.


Sadly, I never got there. I put it off because I don’t quite understand Jinja. If you figured it out, I’d love to know.


Rishan can you pls resend that last link again. We can’t open that link.

Rishab, if you dont mind can you please send me the code to build table using jinja {% for %} to loop over doc.items property? it will be a great help to create Quotation format.

Hi @rmehta!

That link shows an error:

    Traceback (innermost last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/", line 25, in render
    data = render_page_by_language(path)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/", line 91, in render_page_by_language
    return render_page(path)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/", line 113, in render_page
    return build(path)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/", line 122, in build
    return build_method(path)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/", line 138, in build_page
    context = get_context(path)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/", line 31, in get_context
    context = build_context(context)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/", line 94, in build_context = build_template(context)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/", line 28, in build_template
    add_index(out, context)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/website/", line 133, in add_index
 TypeError: 'NoneType' object has no attribute '__getitem__'


1 Like