From 3decf4dbc54245868cbe3bb21451bd2becaba40e Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Thu, 6 Feb 2014 12:50:14 +0530 Subject: [PATCH] Fixes related website hierarchy --- erpnext/selling/doctype/lead/get_leads.py | 4 ++-- erpnext/setup/doctype/item_group/item_group.txt | 10 +++++++++- erpnext/templates/utils.py | 3 +-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/erpnext/selling/doctype/lead/get_leads.py b/erpnext/selling/doctype/lead/get_leads.py index 898ee0e9dc6..ccb691c087c 100644 --- a/erpnext/selling/doctype/lead/get_leads.py +++ b/erpnext/selling/doctype/lead/get_leads.py @@ -5,7 +5,7 @@ from __future__ import unicode_literals import webnotes from webnotes.utils import cstr, cint 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, 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_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") if mail: diff --git a/erpnext/setup/doctype/item_group/item_group.txt b/erpnext/setup/doctype/item_group/item_group.txt index 71be22519c5..953d7b84cee 100644 --- a/erpnext/setup/doctype/item_group/item_group.txt +++ b/erpnext/setup/doctype/item_group/item_group.txt @@ -2,7 +2,7 @@ { "creation": "2013-03-28 10:35:29", "docstatus": 0, - "modified": "2014-01-20 17:48:49", + "modified": "2014-02-05 17:36:23", "modified_by": "Administrator", "owner": "Administrator" }, @@ -111,6 +111,14 @@ "no_copy": 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", "description": "Show this slideshow at the top of the page", diff --git a/erpnext/templates/utils.py b/erpnext/templates/utils.py index d75499ff535..bcd23ab9033 100644 --- a/erpnext/templates/utils.py +++ b/erpnext/templates/utils.py @@ -6,8 +6,7 @@ import webnotes @webnotes.whitelist(allow_guest=True) def send_message(subject="Website Query", message="", sender="", status="Open"): - from webnotes.website.doctype.contact_us_settings.templates.pages.contact \ - import send_message as website_send_message + from webnotes.templates.pages.contact import send_message as website_send_message if not website_send_message(subject, message, sender): return