[minor] Added employees in Newsletter List
This commit is contained in:
parent
0910fc3b25
commit
ccb9117ba5
@ -12,8 +12,8 @@ from email.utils import parseaddr
|
||||
class NewsletterList(Document):
|
||||
def onload(self):
|
||||
singles = [d.name for d in frappe.db.get_all("DocType", "name", {"issingle": 1})]
|
||||
self.get("__onload").import_types = [d.parent \
|
||||
for d in frappe.db.get_all("DocField", "parent", {"options": "Email"}) if d.parent not in singles]
|
||||
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", "label"), {"options": "Email"}) if d.parent not in singles]
|
||||
|
||||
def import_from(self, doctype):
|
||||
"""Extract email ids from given doctype and add them to the current list"""
|
||||
|
@ -290,6 +290,7 @@
|
||||
"label": "Company Email",
|
||||
"oldfieldname": "company_email",
|
||||
"oldfieldtype": "Data",
|
||||
"options": "Email",
|
||||
"permlevel": 0,
|
||||
"reqd": 0
|
||||
},
|
||||
@ -385,6 +386,7 @@
|
||||
"fieldname": "personal_email",
|
||||
"fieldtype": "Data",
|
||||
"label": "Personal Email",
|
||||
"options": "Email",
|
||||
"permlevel": 0
|
||||
},
|
||||
{
|
||||
@ -674,7 +676,7 @@
|
||||
],
|
||||
"icon": "icon-user",
|
||||
"idx": 1,
|
||||
"modified": "2015-02-20 05:02:14.205144",
|
||||
"modified": "2015-07-09 02:25:20.987412",
|
||||
"modified_by": "Administrator",
|
||||
"module": "HR",
|
||||
"name": "Employee",
|
||||
|
Loading…
x
Reference in New Issue
Block a user