mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-07 07:02:54 +00:00
Merge pull request #1604 from anandpdoshi/bugfix-v4
Newsletter status display. Fixes #1593
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
data = [
|
def get_data():
|
||||||
|
return [
|
||||||
{
|
{
|
||||||
"label": _("Documents"),
|
"label": _("Documents"),
|
||||||
"icon": "icon-star",
|
"icon": "icon-star",
|
||||||
@@ -304,4 +305,4 @@ data = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
data = [
|
def get_data():
|
||||||
|
return [
|
||||||
{
|
{
|
||||||
"label": _("Documents"),
|
"label": _("Documents"),
|
||||||
"icon": "icon-star",
|
"icon": "icon-star",
|
||||||
@@ -166,4 +167,4 @@ data = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
data = [
|
def get_data():
|
||||||
|
return [
|
||||||
{
|
{
|
||||||
"label": _("Documents"),
|
"label": _("Documents"),
|
||||||
"icon": "icon-star",
|
"icon": "icon-star",
|
||||||
@@ -194,4 +195,4 @@ data = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
data = [
|
def get_data():
|
||||||
|
return [
|
||||||
{
|
{
|
||||||
"label": _("Documents"),
|
"label": _("Documents"),
|
||||||
"icon": "icon-star",
|
"icon": "icon-star",
|
||||||
@@ -75,4 +76,4 @@ data = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
data = [
|
def get_data():
|
||||||
|
return [
|
||||||
{
|
{
|
||||||
"label": _("Documents"),
|
"label": _("Documents"),
|
||||||
"icon": "icon-star",
|
"icon": "icon-star",
|
||||||
@@ -63,4 +64,4 @@ data = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
data = [
|
def get_data():
|
||||||
|
return [
|
||||||
{
|
{
|
||||||
"label": _("Documents"),
|
"label": _("Documents"),
|
||||||
"icon": "icon-star",
|
"icon": "icon-star",
|
||||||
@@ -262,4 +263,4 @@ data = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
from frappe import _
|
from frappe import _
|
||||||
from frappe.widgets.moduleview import add_setup_section
|
from frappe.widgets.moduleview import add_setup_section
|
||||||
|
|
||||||
data = [
|
def get_data():
|
||||||
|
data = [
|
||||||
{
|
{
|
||||||
"label": _("Settings"),
|
"label": _("Settings"),
|
||||||
"icon": "icon-wrench",
|
"icon": "icon-wrench",
|
||||||
@@ -120,10 +121,7 @@ data = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|
||||||
def get_data():
|
|
||||||
out = list(data)
|
|
||||||
|
|
||||||
for module, label, icon in (
|
for module, label, icon in (
|
||||||
("accounts", _("Accounts"), "icon-money"),
|
("accounts", _("Accounts"), "icon-money"),
|
||||||
@@ -133,6 +131,6 @@ def get_data():
|
|||||||
("hr", _("Human Resources"), "icon-group"),
|
("hr", _("Human Resources"), "icon-group"),
|
||||||
("support", _("Support"), "icon-phone")):
|
("support", _("Support"), "icon-phone")):
|
||||||
|
|
||||||
add_setup_section(out, "erpnext", module, label, icon)
|
add_setup_section(data, "erpnext", module, label, icon)
|
||||||
|
|
||||||
return out
|
return data
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
data = [
|
def get_data():
|
||||||
|
return [
|
||||||
{
|
{
|
||||||
"label": _("Documents"),
|
"label": _("Documents"),
|
||||||
"icon": "icon-star",
|
"icon": "icon-star",
|
||||||
@@ -260,4 +261,4 @@ data = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
from frappe import _
|
from frappe import _
|
||||||
|
|
||||||
data = [
|
def get_data():
|
||||||
|
return [
|
||||||
{
|
{
|
||||||
"label": _("Documents"),
|
"label": _("Documents"),
|
||||||
"icon": "icon-star",
|
"icon": "icon-star",
|
||||||
@@ -71,4 +72,4 @@ data = [
|
|||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -16,6 +16,13 @@ class Newsletter(Document):
|
|||||||
from `tabBulk Email` where ref_doctype=%s and ref_docname=%s
|
from `tabBulk Email` where ref_doctype=%s and ref_docname=%s
|
||||||
group by status""", (self.doctype, self.name))) or None)
|
group by status""", (self.doctype, self.name))) or None)
|
||||||
|
|
||||||
|
def as_dict(self, no_nulls=False):
|
||||||
|
doc = super(Newsletter, self).as_dict(no_nulls)
|
||||||
|
if self.get("__status_count"):
|
||||||
|
doc["__status_count"] = self.get("__status_count")
|
||||||
|
|
||||||
|
return doc
|
||||||
|
|
||||||
def test_send(self, doctype="Lead"):
|
def test_send(self, doctype="Lead"):
|
||||||
self.recipients = self.test_email_id.split(",")
|
self.recipients = self.test_email_id.split(",")
|
||||||
self.send_to_doctype = "Lead"
|
self.send_to_doctype = "Lead"
|
||||||
|
|||||||
Reference in New Issue
Block a user