From 9f79415186917c7756cb4c64d56b254eee2bfe65 Mon Sep 17 00:00:00 2001 From: Anupam Date: Wed, 18 Aug 2021 16:30:45 +0530 Subject: [PATCH 1/2] fix: email digest recipient patch --- .../v13_0/update_recipient_email_digest.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 erpnext/patches/v13_0/update_recipient_email_digest.py diff --git a/erpnext/patches/v13_0/update_recipient_email_digest.py b/erpnext/patches/v13_0/update_recipient_email_digest.py new file mode 100644 index 00000000000..ed90e126670 --- /dev/null +++ b/erpnext/patches/v13_0/update_recipient_email_digest.py @@ -0,0 +1,22 @@ +# Copyright (c) 2020, Frappe and Contributors +# License: GNU General Public License v3. See license.txt + +from __future__ import unicode_literals +import frappe + +def execute(): + frappe.reload_doc("setup", "doctype", "Email Digest") + frappe.reload_doc("setup", "doctype", "Email Digest Recipient") + email_digests = frappe.db.get_list('Email Digest', fields=['name', 'recipient_list']) + for email_digest in email_digests: + if email_digest.recipient_list: + for recipient in email_digest.recipient_list.split("\n"): + if frappe.db.exists('User', recipient): + doc = frappe.get_doc({ + 'doctype': 'Email Digest Recipient', + 'parenttype': 'Email Digest', + 'parentfield': 'recipients', + 'parent': email_digest.name, + 'recipient': recipient + }) + doc.insert() From f0d3a074e03925ee1f0a04e37cb972c406577d74 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Thu, 19 Aug 2021 14:55:52 +0550 Subject: [PATCH 2/2] bumped to version 13.9.2 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/__init__.py b/erpnext/__init__.py index 17960783b14..fa038cebc3a 100644 --- a/erpnext/__init__.py +++ b/erpnext/__init__.py @@ -5,7 +5,7 @@ import frappe from erpnext.hooks import regional_overrides from frappe.utils import getdate -__version__ = '13.9.1' +__version__ = '13.9.2' def get_default_company(user=None): '''Get default company for user'''