Browse Source

fix(Workflow Action): Pass doc to attach_print to avoid "Not Found"

- Printview used to go empty for new document due to "Not Found" error in printview because that new document has not been saved in the database while processing workflow action email.
version-14
Suraj Shetty 3 years ago
parent
commit
20c9af556f
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      frappe/workflow/doctype/workflow_action/workflow_action.py

+ 1
- 1
frappe/workflow/doctype/workflow_action/workflow_action.py View File

@@ -292,7 +292,7 @@ def get_common_email_args(doc):
common_args = { common_args = {
'template': 'workflow_action', 'template': 'workflow_action',
'header': 'Workflow Action', 'header': 'Workflow Action',
'attachments': [frappe.attach_print(doctype, docname , file_name=docname)],
'attachments': [frappe.attach_print(doctype, docname, file_name=docname, doc=doc)],
'subject': subject, 'subject': subject,
'message': response 'message': response
} }


Loading…
Cancel
Save