Issue when fetching Terms and Conditions on a Custom Print Format: values not parsed

In the Terms and Conditions, I have table that shows how many days are left before the quotation expires:

Validity of quotation: {{ expiration_days }}  days

expiration_days is a custom field that stores the number of days. It works perfectly.

When I use a predefined print format, I get the right value:

But when I use a custom print format, I get this result:

Consider that in my custom print format, I fetch the Terms and Conditions using this code:

    {{ frappe.db.get_value("Terms and Conditions", doc.tc_name, "terms") }}

Please help me. Thank you! :blush:

try {{ doc.terms }} instead above frappe.db.get_value(“Terms and Conditions”, doc.tc_name, “terms”)

1 Like

Well, silly me, your suggestion worked. Thank you so much!

Just for the record:

    {{ doc.terms }}

Using this solved my problem.