mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 11:19:09 +00:00
Digest translation improvement (#14026)
This commit is contained in:
committed by
Rushabh Mehta
parent
8501010f12
commit
471dea0d10
@@ -53,17 +53,19 @@ class EmailDigest(Document):
|
|||||||
if recipients:
|
if recipients:
|
||||||
for user_id in recipients:
|
for user_id in recipients:
|
||||||
frappe.set_user(user_id)
|
frappe.set_user(user_id)
|
||||||
msg_for_this_receipient = self.get_msg_html()
|
frappe.set_user_lang(user_id)
|
||||||
if msg_for_this_receipient:
|
msg_for_this_recipient = self.get_msg_html()
|
||||||
|
if msg_for_this_recipient:
|
||||||
frappe.sendmail(
|
frappe.sendmail(
|
||||||
recipients=user_id,
|
recipients=user_id,
|
||||||
subject=_("{frequency} Digest").format(frequency=self.frequency),
|
subject=_("{0} Digest").format(self.frequency),
|
||||||
message=msg_for_this_receipient,
|
message=msg_for_this_recipient,
|
||||||
reference_doctype = self.doctype,
|
reference_doctype = self.doctype,
|
||||||
reference_name = self.name,
|
reference_name = self.name,
|
||||||
unsubscribe_message = _("Unsubscribe from this Email Digest"))
|
unsubscribe_message = _("Unsubscribe from this Email Digest"))
|
||||||
|
|
||||||
frappe.set_user(original_user)
|
frappe.set_user(original_user)
|
||||||
|
frappe.set_user_lang(original_user)
|
||||||
|
|
||||||
def get_msg_html(self):
|
def get_msg_html(self):
|
||||||
"""Build email digest content"""
|
"""Build email digest content"""
|
||||||
|
|||||||
Reference in New Issue
Block a user