New Date field in quotation print format

I want to add new date field . The date will be 1 month from today (quotation created date). I searched and tried many option but comes out with error.

I need solution.

Here is my tried code:

{{ _(“Validity”) }}: {{frappe.datetime.add_months(date, 1);}}

Try with following code, which will find 1 month later date from today’s date -
frappe.datetime.add_months(new Date(),1)

Jinja is showing error for date @priya_s .

Use this code in custom script and set value to newly added date field. Then access this field’s value in print format by using -
e.g : Date : {{ }}

1 Like

You can also use

{{ doc.get_formatted("date") }}
1 Like

Thank you everyone . I solved it. Frappe/Erpnext forum is awesome :smiley: