mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 11:39:18 +00:00
Fixes related website hierarchy
This commit is contained in:
@@ -5,7 +5,7 @@ from __future__ import unicode_literals
|
|||||||
import webnotes
|
import webnotes
|
||||||
from webnotes.utils import cstr, cint
|
from webnotes.utils import cstr, cint
|
||||||
from webnotes.utils.email_lib.receive import POP3Mailbox
|
from webnotes.utils.email_lib.receive import POP3Mailbox
|
||||||
from webnotes.core.doctype.communication.communication import make
|
from webnotes.core.doctype.communication.communication import _make
|
||||||
|
|
||||||
def add_sales_communication(subject, content, sender, real_name, mail=None,
|
def add_sales_communication(subject, content, sender, real_name, mail=None,
|
||||||
status="Open", date=None):
|
status="Open", date=None):
|
||||||
@@ -28,7 +28,7 @@ def add_sales_communication(subject, content, sender, real_name, mail=None,
|
|||||||
parent_doctype = "Contact" if contact_name else "Lead"
|
parent_doctype = "Contact" if contact_name else "Lead"
|
||||||
parent_name = contact_name or lead_name
|
parent_name = contact_name or lead_name
|
||||||
|
|
||||||
message = make(content=content, sender=sender, subject=subject,
|
message = _make(content=content, sender=sender, subject=subject,
|
||||||
doctype = parent_doctype, name = parent_name, date=date, sent_or_received="Received")
|
doctype = parent_doctype, name = parent_name, date=date, sent_or_received="Received")
|
||||||
|
|
||||||
if mail:
|
if mail:
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
{
|
{
|
||||||
"creation": "2013-03-28 10:35:29",
|
"creation": "2013-03-28 10:35:29",
|
||||||
"docstatus": 0,
|
"docstatus": 0,
|
||||||
"modified": "2014-01-20 17:48:49",
|
"modified": "2014-02-05 17:36:23",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"owner": "Administrator"
|
"owner": "Administrator"
|
||||||
},
|
},
|
||||||
@@ -111,6 +111,14 @@
|
|||||||
"no_copy": 0,
|
"no_copy": 0,
|
||||||
"search_index": 0
|
"search_index": 0
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"depends_on": "show_in_website",
|
||||||
|
"doctype": "DocField",
|
||||||
|
"fieldname": "parent_website_sitemap",
|
||||||
|
"fieldtype": "Link",
|
||||||
|
"label": "Parent Website Page",
|
||||||
|
"options": "Website Sitemap"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"depends_on": "show_in_website",
|
"depends_on": "show_in_website",
|
||||||
"description": "Show this slideshow at the top of the page",
|
"description": "Show this slideshow at the top of the page",
|
||||||
|
|||||||
@@ -6,8 +6,7 @@ import webnotes
|
|||||||
|
|
||||||
@webnotes.whitelist(allow_guest=True)
|
@webnotes.whitelist(allow_guest=True)
|
||||||
def send_message(subject="Website Query", message="", sender="", status="Open"):
|
def send_message(subject="Website Query", message="", sender="", status="Open"):
|
||||||
from webnotes.website.doctype.contact_us_settings.templates.pages.contact \
|
from webnotes.templates.pages.contact import send_message as website_send_message
|
||||||
import send_message as website_send_message
|
|
||||||
|
|
||||||
if not website_send_message(subject, message, sender):
|
if not website_send_message(subject, message, sender):
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user