fix: cast dates in print preview

This commit is contained in:
Safwan Samsudeen 2026-02-25 12:01:26 +05:30
parent a71134ee2b
commit 3a11d3cf03

View file

@ -342,7 +342,8 @@ def get_html_and_style(
if isinstance(name, str):
document = frappe.get_lazy_doc(doc, name, check_permission=True)
else:
document = frappe.get_doc(json.loads(doc), check_permission=True)
details = json.loads(doc)
document = frappe.get_cached_doc(details["doctype"], details["name"], check_permission=True)
print_format = get_print_format_doc(print_format, meta=document.meta)
set_link_titles(document)