brotherton-erpnext/erpnext/templates/utils.py

21 lines
627 B
Python

# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
@frappe.whitelist(allow_guest=True)
def send_message(subject="Website Query", message="", sender="", status="Open"):
from frappe.templates.pages.contact import send_message as website_send_message
website_send_message(subject, message, sender)
comm = frappe.get_doc({
"doctype":"Communication",
"subject": subject,
"content": message,
"sender": sender,
"sent_or_received": "Received"
})
comm.insert(ignore_permissions=True)