Cleaned up welcome email code (#15175)

This commit is contained in:
Neil Trini Lasrado 2018-08-24 15:15:56 +05:30 committed by Rushabh Mehta
parent 2b72d09948
commit 771fbb8f01
2 changed files with 8 additions and 0 deletions

View File

@ -27,6 +27,8 @@ doctype_js = {
"Communication": "public/js/communication.js",
}
welcome_email = "erpnext.setup.utils.welcome_email"
# setup wizard
setup_wizard_requires = "assets/erpnext/js/setup_wizard.js"
setup_wizard_stages = "erpnext.setup.setup_wizard.setup_wizard.get_setup_stages"

View File

@ -6,6 +6,7 @@ import frappe
from frappe import _
from frappe.utils import flt, add_days
from frappe.utils import get_datetime_str, nowdate
from erpnext import get_default_company
def get_root_of(doctype):
"""Get root element of a DocType with a tree structure"""
@ -155,3 +156,8 @@ def insert_record(records):
pass
else:
raise
def welcome_email():
site_name = get_default_company()
title = _("Welcome to {0}".format(site_name))
return title