Expected Behaviour
Print a document according to a custom or standard print format.
Actual Behaviour
Displays the following error when trying to print a document(for both standard and custom print formats):
Traceback (most recent call last):
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 39, in render
data = render_page_by_language(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 134, in render_page_by_language
return render_page(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 150, in render_page
return build(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 157, in build
return build_page(path)
File “/home/frappe/frappe-bench/apps/frappe/frappe/website/render.py”, line 171, in build_page
if context.title and “{{” in context.title:
TypeError: argument of type ‘datetime.date’ is not iterable
Steps to reproduce:
I am working on a custom docType called ‘Employment Tax’ that calculates tax and related information. I have completed my work on the docType as it produced the intended result. But I keep getting the error message that I showed above when I try to prepare a custom print format that fetches some calculated values and parameters like date_of_joining and work_tax from the docType and populates fields and tables that I’ve prepared in the print format.
So, the steps to reproduce the issue are:
- Create a new Employment Tax document
- Fill out the necessary fields including child tables
- Save and print the document
Frappé version: v9.1.5
ERPNext version: v9.1.3