mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 15:42:52 +00:00
[minor] Added employees in Newsletter List
This commit is contained in:
@@ -12,8 +12,8 @@ from email.utils import parseaddr
|
|||||||
class NewsletterList(Document):
|
class NewsletterList(Document):
|
||||||
def onload(self):
|
def onload(self):
|
||||||
singles = [d.name for d in frappe.db.get_all("DocType", "name", {"issingle": 1})]
|
singles = [d.name for d in frappe.db.get_all("DocType", "name", {"issingle": 1})]
|
||||||
self.get("__onload").import_types = [d.parent \
|
self.get("__onload").import_types = [{"value": d.parent, "label": "{0} ({1})".format(d.parent, d.label)} \
|
||||||
for d in frappe.db.get_all("DocField", "parent", {"options": "Email"}) if d.parent not in singles]
|
for d in frappe.db.get_all("DocField", ("parent", "label"), {"options": "Email"}) if d.parent not in singles]
|
||||||
|
|
||||||
def import_from(self, doctype):
|
def import_from(self, doctype):
|
||||||
"""Extract email ids from given doctype and add them to the current list"""
|
"""Extract email ids from given doctype and add them to the current list"""
|
||||||
|
|||||||
@@ -290,6 +290,7 @@
|
|||||||
"label": "Company Email",
|
"label": "Company Email",
|
||||||
"oldfieldname": "company_email",
|
"oldfieldname": "company_email",
|
||||||
"oldfieldtype": "Data",
|
"oldfieldtype": "Data",
|
||||||
|
"options": "Email",
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"reqd": 0
|
"reqd": 0
|
||||||
},
|
},
|
||||||
@@ -385,6 +386,7 @@
|
|||||||
"fieldname": "personal_email",
|
"fieldname": "personal_email",
|
||||||
"fieldtype": "Data",
|
"fieldtype": "Data",
|
||||||
"label": "Personal Email",
|
"label": "Personal Email",
|
||||||
|
"options": "Email",
|
||||||
"permlevel": 0
|
"permlevel": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -674,7 +676,7 @@
|
|||||||
],
|
],
|
||||||
"icon": "icon-user",
|
"icon": "icon-user",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"modified": "2015-02-20 05:02:14.205144",
|
"modified": "2015-07-09 02:25:20.987412",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "HR",
|
"module": "HR",
|
||||||
"name": "Employee",
|
"name": "Employee",
|
||||||
|
|||||||
Reference in New Issue
Block a user