Jinja Templating in Terms and Conditions

Hi,

I’m trying to use Jinja templating in Terms and Conditions with links.
For example, in Quotation or Sales Invoice, I have the customer fieldname.
This fieldname is a link to a Customer DocType which have customer_type fieldname.

When I’m trying to do {{ customer.customer_type }}, i have the following error : {{ no such element: unicode object['customer_type'] }}.

Regards,
Quentin

@qrevel,

you will need to fetch the customer type from customer master using frappe.db.get_value method.

e.g. {{ frappe.db.get_value("Customer", doc.customer, "customer_type") }}

Thanks,
Makarand

Thanks, that was it.
I’ve got an error but replace doc.customer by customer.