[setup] send welcome emails after setup
This commit is contained in:
parent
7b6daafbb9
commit
99d90e1f34
15
erpnext/setup/page/setup_wizard/emails/email-1.md
Normal file
15
erpnext/setup/page/setup_wizard/emails/email-1.md
Normal file
@ -0,0 +1,15 @@
|
||||
Dear {{ fullname }},
|
||||
|
||||
If you aren't a pro, setting me up, is not an easy job. Here are some tips:
|
||||
|
||||
1. Try and make dummy cycles: Run your dummy quotes, invoices, payments, deliveries in the system so that you can get familiar with what I can do for you.
|
||||
1. Data Import Tool: You can import bulk data into me using the data import tool: via Setup > Data > Data Import Tool
|
||||
1. Help me make more friends: Add more users via Setup > Users and Permissions > User
|
||||
|
||||
If you need help or are stuck, [head to the user forum](https://discuss.frappe.io) or [read my manual](https://manual.erpnext.com).
|
||||
|
||||
Best of luck!
|
||||
|
||||
Your ERPNext Account\*
|
||||
|
||||
\* This is an automated messaged sent by your ERPNext installation to keep you motivated. You will receive one more such message in another 3 days.
|
16
erpnext/setup/page/setup_wizard/emails/email-2.md
Normal file
16
erpnext/setup/page/setup_wizard/emails/email-2.md
Normal file
@ -0,0 +1,16 @@
|
||||
Dear {{ fullname }},
|
||||
|
||||
Hey, how's it going?
|
||||
|
||||
If you still need some help, there is a large community out there to help you. Some places you can start:
|
||||
|
||||
1. [Ask your questions in the user forum](https://discuss.frappe.io)
|
||||
1. [Buy support from the ERPNext Team](https://erpnext.com/pricing)
|
||||
1. [Connect with a Service Provider](https://community.erpnext.com/service-providers)
|
||||
1. [Hangout on the community chat (gitter.im)](https://gitter.im/frappe/erpnext)
|
||||
|
||||
Thanks!
|
||||
|
||||
Your ERPNext Account\*
|
||||
|
||||
\* That's it from me. Have fun!
|
@ -179,4 +179,3 @@ def install(country=None):
|
||||
pass
|
||||
else:
|
||||
raise
|
||||
|
||||
|
@ -50,7 +50,7 @@ erpnext.wiz.Wizard = Class.extend({
|
||||
this.slides = this.slides;
|
||||
this.slide_dict = {};
|
||||
this.welcomed = true;
|
||||
frappe.set_route(this.page_name, "0");
|
||||
frappe.set_route("setup-wizard/0");
|
||||
},
|
||||
make: function() {
|
||||
this.parent = $('<div class="setup-wizard-wrapper">').appendTo(this.parent);
|
||||
|
@ -13,6 +13,7 @@ from frappe.geo.country_info import get_country_info
|
||||
from frappe.utils.nestedset import get_root_of
|
||||
from default_website import website_maker
|
||||
import install_fixtures
|
||||
from welcome_emails import setup_welcome_emails
|
||||
|
||||
@frappe.whitelist()
|
||||
def setup_account(args=None):
|
||||
@ -75,6 +76,8 @@ def setup_account(args=None):
|
||||
|
||||
login_as_first_user(args)
|
||||
|
||||
setup_welcome_emails()
|
||||
|
||||
frappe.db.commit()
|
||||
|
||||
frappe.clear_cache()
|
||||
|
19
erpnext/setup/page/setup_wizard/welcome_emails.py
Normal file
19
erpnext/setup/page/setup_wizard/welcome_emails.py
Normal file
@ -0,0 +1,19 @@
|
||||
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
from frappe.utils import add_days, nowdate, get_fullname
|
||||
|
||||
def setup_welcome_emails():
|
||||
for email in (
|
||||
{"fname": "email-1.md", "subject": "Setting up ERPNext", "after": 1},
|
||||
{"fname": "email-2.md", "subject": "Getting ERPNext Help", "after": 3},
|
||||
):
|
||||
content = frappe.get_template("setup/page/setup_wizard/emails/" \
|
||||
+ email["fname"]).render({"fullname": get_fullname()})
|
||||
|
||||
frappe.sendmail(recipients = frappe.session.user, subject = email["subject"],
|
||||
sender = "hello@erpnext.com",
|
||||
content=content, as_bulk = True,
|
||||
send_after= add_days(nowdate(), email["after"]))
|
Loading…
x
Reference in New Issue
Block a user