Doc.items() returns empty list on Quotation doctype in Custom Print Format

When I try to loop over quotation items, I get an empty list, but the quotation itself has more than one item.

I’m accessing the items in this manner:

 {% for row in doc.items %}
{% endfor %}

Or just simply:

{{ doc.items }}

The last one just displays an empty list []. Am obviously doing something wrong. How can I loop over/access the doc’s items.

This is working fine for me.

{%- for item in doc.items -%}
  {{ item.item_name }}
{%- endfor -%}

This is the same as in my post. And its not working for me.