fix: use document language for workflow action (#26138)
This commit is contained in:
parent
2ec9ef5bf3
commit
e5271bc034
1 changed files with 17 additions and 1 deletions
|
|
@ -438,10 +438,26 @@ def get_common_email_args(doc):
|
||||||
subject = _("Workflow Action") + f" on {doctype}: {docname}"
|
subject = _("Workflow Action") + f" on {doctype}: {docname}"
|
||||||
response = get_link_to_form(doctype, docname, f"{doctype}: {docname}")
|
response = get_link_to_form(doctype, docname, f"{doctype}: {docname}")
|
||||||
|
|
||||||
|
print_format = doc.meta.default_print_format
|
||||||
|
lang = doc.get("language") or (
|
||||||
|
frappe.get_cached_value("Print Format", print_format, "default_print_language")
|
||||||
|
if print_format
|
||||||
|
else None
|
||||||
|
)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"template": "workflow_action",
|
"template": "workflow_action",
|
||||||
"header": "Workflow Action",
|
"header": "Workflow Action",
|
||||||
"attachments": [frappe.attach_print(doctype, docname, file_name=docname, doc=doc)],
|
"attachments": [
|
||||||
|
frappe.attach_print(
|
||||||
|
doctype,
|
||||||
|
docname,
|
||||||
|
file_name=docname,
|
||||||
|
doc=doc,
|
||||||
|
lang=lang,
|
||||||
|
print_format=print_format,
|
||||||
|
)
|
||||||
|
],
|
||||||
"subject": subject,
|
"subject": subject,
|
||||||
"message": response,
|
"message": response,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue