Merge branch 'hotfix'
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index cd1d288..ca6ffba 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -2,7 +2,7 @@
 from __future__ import unicode_literals
 import frappe
 
-__version__ = '7.2.23'
+__version__ = '7.2.24'
 
 def get_default_company(user=None):
 	'''Get default company for user'''
diff --git a/erpnext/accounts/doctype/payment_request/payment_request.json b/erpnext/accounts/doctype/payment_request/payment_request.json
index e6a3131..3fcf535 100644
--- a/erpnext/accounts/doctype/payment_request/payment_request.json
+++ b/erpnext/accounts/doctype/payment_request/payment_request.json
@@ -362,7 +362,7 @@
    "collapsible": 0, 
    "columns": 0, 
    "fieldname": "message", 
-   "fieldtype": "Small Text", 
+   "fieldtype": "Text", 
    "hidden": 0, 
    "ignore_user_permissions": 0, 
    "ignore_xss_filter": 0, 
@@ -400,7 +400,7 @@
    "label": "Message Examples", 
    "length": 0, 
    "no_copy": 0, 
-   "options": "<pre><h5>Message Example</h5>\n\n&lt;p&gt; Thank You for being a part of {{ doc.company }}! We hope you are enjoying the service.&lt;/p&gt;\n\n&lt;p&gt; Please find enclosed the E Bill statement. The outstanding amount is {{ doc.grand_total }}.&lt;/p&gt;\n\n&lt;p&gt; We don't want you to be spending time running around in order to pay for your Bill.<br>After all, life is beautiful and the time you have in hand should be spent to enjoy it!<br>So here are our little ways to help you get more time for life! &lt;/p&gt;\n\n&lt;a href=\"{{ payment_url }}\"&gt; click here to pay &lt;/a&gt;\n\n</pre>\n", 
+   "options": "<pre><h5>Message Example</h5>\n\n&lt;p&gt;Dear {{ doc.contact_person }},&lt;/p&gt;\n\n&lt;p&gt;Requesting payment for {{ doc.doctype }}, {{ doc.name }} for {{ doc.grand_total }}.&lt;/p&gt;\n\n&lt;a href=\"{{ payment_url }}\"&gt; click here to pay &lt;/a&gt;\n\n</pre>\n", 
    "permlevel": 0, 
    "precision": "", 
    "print_hide": 0, 
@@ -675,13 +675,13 @@
  "hide_toolbar": 0, 
  "idx": 0, 
  "image_view": 0, 
- "in_create": 1, 
+ "in_create": 0, 
  "in_dialog": 0, 
  "is_submittable": 1, 
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2016-12-15 14:46:19.662816", 
+ "modified": "2017-02-23 05:03:37.464863", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Payment Request", 
diff --git a/erpnext/accounts/doctype/payment_request/payment_request.py b/erpnext/accounts/doctype/payment_request/payment_request.py
index 26663fd..99deb3f 100644
--- a/erpnext/accounts/doctype/payment_request/payment_request.py
+++ b/erpnext/accounts/doctype/payment_request/payment_request.py
@@ -26,7 +26,7 @@
 		ref_doc = frappe.get_doc(self.reference_doctype, self.reference_name)
 		if self.payment_account and ref_doc.currency != frappe.db.get_value("Account", self.payment_account, "account_currency"):
 			frappe.throw(_("Transaction currency must be same as Payment Gateway currency"))
-		
+
 	def on_submit(self):
 		send_mail = True
 		self.make_communication_entry()
@@ -54,20 +54,20 @@
 	def set_payment_request_url(self):
 		if self.payment_account:
 			self.payment_url = self.get_payment_url()
-		
+
 		if self.payment_url:
 			self.db_set('payment_url', self.payment_url)
-			
+
 		if self.payment_url or not self.payment_gateway_account:
 			self.db_set('status', 'Initiated')
-	
+
 	def get_payment_url(self):
 		data = frappe.db.get_value(self.reference_doctype, self.reference_name,
 			["company", "customer_name"], as_dict=1)
-		
+
 		controller = get_integration_controller(self.payment_gateway)
 		controller.validate_transaction_currency(self.currency)
-		
+
 		return controller.get_payment_url(**{
 			"amount": self.grand_total,
 			"title": data.company,
@@ -83,7 +83,7 @@
 	def set_as_paid(self):
 		if frappe.session.user == "Guest":
 			frappe.set_user("Administrator")
-		
+
 		payment_entry = self.create_payment_entry()
 		self.make_invoice()
 
@@ -157,7 +157,7 @@
 
 	def set_as_cancelled(self):
 		self.db_set("status", "Cancelled")
-	
+
 	def check_if_payment_entry_exists(self):
 		if self.status == "Paid":
 			payment_entry = frappe.db.sql_list("""select parent from `tabPayment Entry Reference`
@@ -179,11 +179,11 @@
 
 	def get_payment_success_url(self):
 		return self.payment_success_url
-	
+
 	def on_payment_authorized(self, status=None):
 		if not status:
 			return
-		
+
 		shopping_cart_settings = frappe.get_doc("Shopping Cart Settings")
 
 		if status in ["Authorized", "Completed"]:
@@ -203,9 +203,9 @@
 					}).get(success_url, "me")
 				else:
 					redirect_to = get_url("/orders/{0}".format(self.reference_name))
-			
+
 			return redirect_to
-			
+
 @frappe.whitelist(allow_guest=True)
 def make_payment_request(**args):
 	"""Make payment request"""
@@ -234,7 +234,7 @@
 			"grand_total": grand_total,
 			"email_to": args.recipient_id or "",
 			"subject": "Payment Request for %s"%args.dn,
-			"message": gateway_account.get("message") or get_dummy_message(args.use_dummy_message),
+			"message": gateway_account.get("message") or get_dummy_message(ref_doc),
 			"reference_doctype": args.dt,
 			"reference_name": args.dn
 		})
@@ -319,19 +319,24 @@
 		payment_request_name = frappe.db.get_value("Payment Request",
 			{"reference_doctype": ref.reference_doctype, "reference_name": ref.reference_name,
 			"docstatus": 1})
-		
+
 		if payment_request_name:
 			doc = frappe.get_doc("Payment Request", payment_request_name)
 			if doc.status != "Paid":
 				doc.db_set('status', 'Paid')
 				frappe.db.commit()
 
-def get_dummy_message(use_dummy_message=True):
-	return """
-		<p> Hope you are enjoying a service. Please consider bank details for payment </p>
-		<p> Bank Details <p><br>
-		<p> Bank Name : National Bank </p>
-		<p> Account Number : 123456789000872 </p>
-		<p> IFSC code : NB000001 </p>
-		<p> Account Name : Wind Power LLC </p>
-	"""
+def get_dummy_message(doc):
+	return frappe.render_template("""{% if doc.contact_person -%}
+<p>Dear {{ doc.contact_person }},</p>
+{%- else %}<p>Hello,</p>{% endif %}
+
+<p>{{ _("Requesting payment against {0} {1} for amount {2}").format(doc.doctype,
+	doc.name, doc.get_formatted("grand_total")) }}</p>
+
+<a href="{{ payment_url }}">{{ _("Make Payment") }}</a>
+
+<p>{{ _("If you have any questions, please get back to us.") }}</p>
+
+<p>{{ _("Thank you for your business!") }}</p>
+""", dict(doc=doc, payment_url = '{{ payment_url }}'))
diff --git a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
index b6378f1..5f4e8c0 100644
--- a/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
+++ b/erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
@@ -8,7 +8,7 @@
 erpnext.accounts.PurchaseInvoice = erpnext.buying.BuyingController.extend({
 	onload: function() {
 		this._super();
-		
+
 		if(!this.frm.doc.__islocal) {
 			// show credit_to in print format
 			if(!this.frm.doc.supplier && this.frm.doc.credit_to) {
@@ -32,7 +32,7 @@
 		if(doc.update_stock==1 && doc.docstatus==1) {
 			this.show_stock_ledger();
 		}
-		
+
 		if(!doc.is_return && doc.docstatus==1) {
 			if(doc.outstanding_amount != 0) {
 				this.frm.add_custom_button(__('Payment'), this.make_payment_entry, __("Make"));
@@ -336,6 +336,12 @@
 }
 
 frappe.ui.form.on("Purchase Invoice", {
+	setup: function(frm) {
+		frm.custom_make_buttons = {
+			'Purchase Invoice': 'Debit Note',
+			'Payment Entry': 'Payment'
+		}
+	},
 	onload: function(frm) {
 		$.each(["warehouse", "rejected_warehouse"], function(i, field) {
 			frm.set_query(field, "items", function() {
diff --git a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
index 6268fe3..1564b48 100644
--- a/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
+++ b/erpnext/accounts/doctype/sales_invoice/sales_invoice.js
@@ -469,6 +469,12 @@
 
 frappe.ui.form.on('Sales Invoice', {
 	setup: function(frm){
+		frm.custom_make_buttons = {
+			'Delivery Note': 'Delivery',
+			'Sales Invoice': 'Sales Return',
+			'Payment Request': 'Payment Request',
+			'Payment': 'Payment Entry'
+		},
 		frm.fields_dict["timesheets"].grid.get_field("time_sheet").get_query = function(doc, cdt, cdn){
 			return{
 				query: "erpnext.projects.doctype.timesheet.timesheet.get_timesheet",
diff --git a/erpnext/buying/doctype/purchase_order/purchase_order.js b/erpnext/buying/doctype/purchase_order/purchase_order.js
index 15356fd..66b3e31 100644
--- a/erpnext/buying/doctype/purchase_order/purchase_order.js
+++ b/erpnext/buying/doctype/purchase_order/purchase_order.js
@@ -6,6 +6,13 @@
 {% include 'erpnext/buying/doctype/purchase_common/purchase_common.js' %};
 
 frappe.ui.form.on("Purchase Order", {
+	setup: function(frm) {
+		frm.custom_make_buttons = {
+			'Purchase Receipt': 'Receive',
+			'Purchase Invoice': 'Invoice',
+			'Stock Entry': 'Material to Supplier'
+		}
+	},
 	onload: function(frm) {
 		erpnext.queries.setup_queries(frm, "Warehouse", function() {
 			return erpnext.queries.warehouse(frm.doc);
@@ -28,10 +35,8 @@
 			var item = cur_frm.doc.items[i];
 			if(item.delivered_by_supplier !== 1) {
 				allow_receipt = true;
-			}
-
-			else {
-				is_drop_ship = true
+			} else {
+				is_drop_ship = true;
 			}
 
 			if(is_drop_ship && allow_receipt) {
diff --git a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js
index 6847a98..d10c178 100644
--- a/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js
+++ b/erpnext/buying/doctype/request_for_quotation/request_for_quotation.js
@@ -8,6 +8,10 @@
 
 frappe.ui.form.on("Request for Quotation",{
 	setup: function(frm) {
+		frm.custom_make_buttons = {
+			'Supplier Quotation': 'Supplier Quotation'
+		}
+
 		frm.fields_dict["suppliers"].grid.get_field("contact").get_query = function(doc, cdt, cdn){
 			var d =locals[cdt][cdn];
 			return {
diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js
index 0323c2f..eaec8f8 100644
--- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js
+++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js
@@ -4,6 +4,14 @@
 // attach required files
 {% include 'erpnext/buying/doctype/purchase_common/purchase_common.js' %};
 
+frappe.ui.form.on('Suppier Quotation', {
+	setup: function() {
+		frm.custom_make_buttons = {
+			'Purchase Order': 'Purchase Order'
+		}
+	}
+});
+
 erpnext.buying.SupplierQuotationController = erpnext.buying.BuyingController.extend({
 	refresh: function() {
 		this._super();
diff --git a/erpnext/config/desktop.py b/erpnext/config/desktop.py
index 9397ffc..75b7660 100644
--- a/erpnext/config/desktop.py
+++ b/erpnext/config/desktop.py
@@ -231,7 +231,7 @@
 		{
 			"module_name": "Assessment",
 			"color": "#8a70be",
-			"icon": "fa fa-file-text-alt",
+			"icon": "fa fa-file-text",
 			"label": _("Assessment"),
 			"link": "List/Assessment",
 			"_doctype": "Assessment",
diff --git a/erpnext/crm/doctype/opportunity/opportunity.js b/erpnext/crm/doctype/opportunity/opportunity.js
index b86a5a5..45596b1 100644
--- a/erpnext/crm/doctype/opportunity/opportunity.js
+++ b/erpnext/crm/doctype/opportunity/opportunity.js
@@ -5,6 +5,12 @@
 
 cur_frm.email_field = "contact_email";
 frappe.ui.form.on("Opportunity", {
+	setup: function(frm) {
+		frm.custom_make_buttons = {
+			'Quotation': 'Quotation',
+			'Supplier Quotation': 'Supplier Quotation'
+		}
+	},
 	customer: function(frm) {
 		erpnext.utils.get_party_details(frm);
 	},
@@ -35,7 +41,7 @@
 				cur_frm.cscript.create_quotation, __("Make"));
 
 			frm.page.set_inner_btn_group_as_primary(__("Make"));
-		
+
 			if(doc.status!=="Quotation") {
 				frm.add_custom_button(__('Lost'),
 					cur_frm.cscript['Declare Opportunity Lost']);
@@ -62,7 +68,7 @@
 		if(!this.frm.doc.status)
 			set_multiple(this.frm.doc.doctype, this.frm.doc.name, { status:'Open' });
 		if(!this.frm.doc.company && frappe.defaults.get_user_default("Company"))
-			set_multiple(this.frm.doc.doctype, this.frm.doc.name, 
+			set_multiple(this.frm.doc.doctype, this.frm.doc.name,
 				{ company:frappe.defaults.get_user_default("Company") });
 
 		this.setup_queries();
diff --git a/erpnext/crm/doctype/opportunity/opportunity_dashboard.py b/erpnext/crm/doctype/opportunity/opportunity_dashboard.py
index 40ff6d0..1939c2e 100644
--- a/erpnext/crm/doctype/opportunity/opportunity_dashboard.py
+++ b/erpnext/crm/doctype/opportunity/opportunity_dashboard.py
@@ -8,7 +8,6 @@
 		},
 		'transactions': [
 			{
-				'label': _('Related'),
 				'items': ['Quotation', 'Supplier Quotation']
 			},
 		]
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index 95f6c0b..af364e8 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -28,6 +28,7 @@
 
 boot_session = "erpnext.startup.boot.boot_session"
 notification_config = "erpnext.startup.notifications.get_notification_config"
+get_help_messages = "erpnext.utilities.activation.get_help_messages"
 
 on_session_creation = "erpnext.shopping_cart.utils.set_cart_count"
 on_logout = "erpnext.shopping_cart.utils.clear_cart_count"
diff --git a/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js b/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js
index 507d070..3cc8dd5 100644
--- a/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js
+++ b/erpnext/hr/doctype/holiday_list/holiday_list_calendar.js
@@ -3,8 +3,8 @@
 
 frappe.views.calendar["Holiday List"] = {
 	field_map: {
-		"start": "from_date",
-		"end": "to_date",
+		"start": "holiday_date",
+		"end": "holiday_date",
 		"id": "name",
 		"title": "description",
 		"allDay": "allDay"
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index 799730e..4e08287 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -781,7 +781,9 @@
 					if(k=="price_list_rate") {
 						if(flt(v) != flt(d.price_list_rate)) price_list_rate_changed = true;
 					}
-					frappe.model.set_value(d.doctype, d.name, k, v);
+					if(v) {
+						frappe.model.set_value(d.doctype, d.name, k, v);
+					}
 				}
 			}
 
diff --git a/erpnext/public/js/utils.js b/erpnext/public/js/utils.js
index 74e9fb6..bf6941b 100644
--- a/erpnext/public/js/utils.js
+++ b/erpnext/public/js/utils.js
@@ -47,6 +47,7 @@
 				fields: [
 					{
 						"fieldtype": "Link",
+						"fieldname": "serial_no",
 						"options": "Serial No",
 						"label": __("Serial No"),
 						"get_query": function () {
@@ -60,6 +61,7 @@
 					},
 					{
 						"fieldtype": "Button",
+						"fieldname": "add",
 						"label": __("Add")
 					}
 				]
diff --git a/erpnext/public/js/utils/party.js b/erpnext/public/js/utils/party.js
index a3f3550..880a46c 100644
--- a/erpnext/public/js/utils/party.js
+++ b/erpnext/public/js/utils/party.js
@@ -46,11 +46,26 @@
 				frm.updating_party_details = false;
 				if(callback) callback();
 				frm.refresh();
+				erpnext.utils.add_item(frm);
 			}
 		}
 	});
 }
 
+erpnext.utils.add_item = function(frm) {
+	if(frm.is_new()) {
+		var prev_route = frappe.get_prev_route();
+		if(prev_route[1]==='Item' && !(frm.doc.items && frm.doc.items.length)) {
+			// add row
+			item = frm.add_child('items');
+			frm.refresh_field('items');
+
+			// set item
+			frappe.model.set_value(item.doctype, item.name, 'item_code', prev_route[2]);
+		}
+	}
+}
+
 erpnext.utils.get_address_display = function(frm, address_field, display_field, is_your_company_address) {
 	if(frm.updating_party_details) return;
 
diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js
index d111c14..81f4236 100644
--- a/erpnext/selling/doctype/quotation/quotation.js
+++ b/erpnext/selling/doctype/quotation/quotation.js
@@ -4,6 +4,14 @@
 
 {% include 'erpnext/selling/sales_common.js' %}
 
+frappe.ui.form.on('Quotation', {
+	setup: function(frm) {
+		frm.custom_make_buttons = {
+			'Sales Order': 'Make Sales Order'
+		}
+	}
+});
+
 erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
 	onload: function(doc, dt, dn) {
 		var me = this;
diff --git a/erpnext/selling/doctype/sales_order/sales_order.js b/erpnext/selling/doctype/sales_order/sales_order.js
index f1eeccc..96a94f1 100644
--- a/erpnext/selling/doctype/sales_order/sales_order.js
+++ b/erpnext/selling/doctype/sales_order/sales_order.js
@@ -4,6 +4,14 @@
 {% include 'erpnext/selling/sales_common.js' %}
 
 frappe.ui.form.on("Sales Order", {
+	setup: function(frm) {
+		frm.custom_make_buttons = {
+			'Delivery Note': 'Delivery',
+			'Sales Invoice': 'Invoice',
+			'Material Request': 'Material Request',
+			'Purchase Order': 'Purchase Order'
+		}
+	},
 	onload: function(frm) {
 		erpnext.queries.setup_queries(frm, "Warehouse", function() {
 			return erpnext.queries.warehouse(frm.doc);
diff --git a/erpnext/selling/page/sales_analytics/sales_analytics.js b/erpnext/selling/page/sales_analytics/sales_analytics.js
index 2f9b02c..73793d4 100644
--- a/erpnext/selling/page/sales_analytics/sales_analytics.js
+++ b/erpnext/selling/page/sales_analytics/sales_analytics.js
@@ -202,7 +202,9 @@
 				if (posting_date >= from_date && posting_date <= to_date) {
 					var item = me.item_by_name[tl[me.tree_grid.item_key]] ||
 						me.item_by_name['Not Set'];
-					item[me.column_map[tl.posting_date].field] += (is_val ? tl.base_net_amount : tl.qty);
+					if(item){
+						item[me.column_map[tl.posting_date].field] += (is_val ? tl.base_net_amount : tl.qty);
+					}
 				}
 			}
 		});
diff --git a/erpnext/stock/doctype/delivery_note/delivery_note.js b/erpnext/stock/doctype/delivery_note/delivery_note.js
index 204e98a..2d659a3 100644
--- a/erpnext/stock/doctype/delivery_note/delivery_note.js
+++ b/erpnext/stock/doctype/delivery_note/delivery_note.js
@@ -8,6 +8,12 @@
 
 frappe.ui.form.on("Delivery Note", {
 	setup: function(frm) {
+		frm.custom_make_buttons = {
+			'Packing Slip': 'Packing Slip',
+			'Installation Note': 'Installation Note',
+			'Sales Invoice': 'Invoice',
+			'Stock Entry': 'Return',
+		},
 		frm.set_indicator_formatter('item_code',
 			function(doc) {
 				return (doc.docstatus==1 || doc.qty<=doc.actual_qty) ? "green" : "orange"
diff --git a/erpnext/stock/doctype/material_request/material_request.js b/erpnext/stock/doctype/material_request/material_request.js
index 2b1fb7f..3a5a351 100644
--- a/erpnext/stock/doctype/material_request/material_request.js
+++ b/erpnext/stock/doctype/material_request/material_request.js
@@ -4,7 +4,19 @@
 {% include 'erpnext/buying/doctype/purchase_common/purchase_common.js' %};
 
 frappe.ui.form.on('Material Request', {
+	setup: function(frm) {
+		frm.custom_make_buttons = {
+			'Stock Entry': 'Issue Material',
+			'Purchase Order': 'Purchase Order',
+			'Request for Quotation': 'Request for Quotation',
+			'Supplier Quotation': 'Supplier Quotation',
+			'Production Order': 'Production Order'
+		}
+	},
 	onload: function(frm) {
+		// add item, if previous view was item
+		erpnext.utils.add_item(frm);
+
 		// formatter for material request item
 		frm.set_indicator_formatter('item_code',
 			function(doc) { return (doc.qty<=doc.ordered_qty) ? "green" : "orange" }),
@@ -71,7 +83,7 @@
 
 				if(doc.material_request_type === "Manufacture" && doc.status === "Submitted")
 					cur_frm.add_custom_button(__("Production Order"),
-					this.raise_production_orders, __("Make"));
+					function() { me.raise_production_orders() }, __("Make"));
 
 				cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
 
@@ -202,10 +214,16 @@
 	},
 
 	raise_production_orders: function() {
+		var me = this;
 		frappe.call({
 			method:"erpnext.stock.doctype.material_request.material_request.raise_production_orders",
 			args: {
-				"material_request": cur_frm.doc.name
+				"material_request": me.frm.doc.name
+			},
+			callback: function(r) {
+				if(r.message.length) {
+					me.frm.reload_doc();
+				}
 			}
 		});
 	}
diff --git a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
index 457a7c2..0fd931a 100644
--- a/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
+++ b/erpnext/stock/doctype/purchase_receipt/purchase_receipt.js
@@ -6,6 +6,12 @@
 frappe.provide("erpnext.stock");
 
 frappe.ui.form.on("Purchase Receipt", {
+	setup: function(frm) {
+		frm.custom_make_buttons = {
+			'Stock Entry': 'Return',
+			'Purchase Invoice': 'Invoice'
+		}
+	},
 	onload: function(frm) {
 		$.each(["warehouse", "rejected_warehouse"], function(i, field) {
 			frm.set_query(field, "items", function() {
@@ -26,7 +32,7 @@
 				]
 			}
 		});
-		
+
 	}
 });
 
diff --git a/erpnext/stock/doctype/stock_entry/stock_entry.js b/erpnext/stock/doctype/stock_entry/stock_entry.js
index a5a6ced..df237a4 100644
--- a/erpnext/stock/doctype/stock_entry/stock_entry.js
+++ b/erpnext/stock/doctype/stock_entry/stock_entry.js
@@ -66,6 +66,7 @@
 			this.show_general_ledger();
 		}
 		erpnext.hide_company();
+		erpnext.utils.add_item(this.frm);
 	},
 
 	on_submit: function() {
@@ -176,7 +177,6 @@
 				excise.voucher_type = 'Excise Entry';
 				frappe.set_route('Form', 'Journal Entry', excise.name);
 			}, __("Make"));
-			cur_frm.page.set_inner_btn_group_as_primary(__("Make"));
 	},
 
 	items_add: function(doc, cdt, cdn) {
diff --git a/erpnext/utilities/activation.py b/erpnext/utilities/activation.py
index 563f71e..eec3973 100644
--- a/erpnext/utilities/activation.py
+++ b/erpnext/utilities/activation.py
@@ -1,4 +1,6 @@
-import frappe
+import frappe, erpnext
+
+from frappe import _
 
 def get_level():
 	activation_level = 0
@@ -20,6 +22,9 @@
 	if frappe.db.count('Employee') > 3:
 		activation_level += 1
 
+	if frappe.db.count('Lead') > 3:
+		activation_level += 1
+
 	if frappe.db.count('Payment Entry') > 2:
 		activation_level += 1
 
@@ -29,8 +34,104 @@
 	if frappe.db.count('User') > 5:
 		activation_level += 1
 
+	if frappe.db.count('Student') > 5:
+		activation_level += 1
+
+	if frappe.db.count('Student Batch') > 5:
+		activation_level += 1
+
+	if frappe.db.count('Instructor') > 5:
+		activation_level += 1
+
 	# recent login
 	if frappe.db.sql('select name from tabUser where last_login > date_sub(now(), interval 2 day) limit 1'):
 		activation_level += 1
 
-	return activation_level
\ No newline at end of file
+	return activation_level
+
+def get_help_messages():
+	'''Returns help messages to be shown on Desktop'''
+	# if get_level() > 6:
+	# 	return []
+
+	messages = []
+
+	domain = frappe.db.get_value('Company', erpnext.get_default_company(), 'domain')
+
+	if domain in ('Manufacturing', 'Retail', 'Services', 'Distribution'):
+		count = frappe.db.count('Lead')
+		if count < 3:
+			messages.append(dict(
+				title=_('Create Leads'),
+				description=_('Create Leads'),
+				action=_('Leads help you get business, add all your contacts and more as your leads'),
+				route='List/Lead',
+				count=count
+			))
+
+		count = frappe.db.count('Quotation')
+		if count < 3:
+			messages.append(dict(
+				title=_('Create customer quotes'),
+				description=_('Quotations are proposals, bids you have sent to your customers'),
+				action=_('Make Quotation'),
+				route='List/Quotation'
+			))
+
+		count = frappe.db.count('Sales Order')
+		if count < 3:
+			messages.append(dict(
+				title=_('Manage your orders'),
+				description=_('Make Sales Orders to help you plan your work and deliver on-time'),
+				action=_('Make Sales Order'),
+				route='List/Sales Order'
+			))
+
+		count = frappe.db.count('Purchase Order')
+		if count < 3:
+			messages.append(dict(
+				title=_('Create Purchase Orders'),
+				description=_('Purchase orders help you plan and follow up on your purchases'),
+				action=_('Make Purchase Order'),
+				route='List/Purchase Order'
+			))
+
+		count = frappe.db.count('User')
+		if count < 3:
+			messages.append(dict(
+				title=_('Create Users'),
+				description=_('Add the rest of your organization as your users. You can also add invite Customers to your portal by adding them from Contacts'),
+				action=_('Make User'),
+				route='List/User'
+			))
+
+	elif domain == 'Education':
+		count = frappe.db.count('Student')
+		if count < 5:
+			messages.append(dict(
+				title=_('Add Students'),
+				description=_('Students are at the heart of the system, add all your students'),
+				action=_('Make Student'),
+				route='List/Student'
+			))
+
+		count = frappe.db.count('Student Batch')
+		if count < 3:
+			messages.append(dict(
+				title=_('Group your students in batches'),
+				description=_('Student Batches help you track attendance, assessments and fees for students'),
+				action=_('Make Student Batch'),
+				route='List/Student Batch'
+			))
+
+	# anyways
+	count = frappe.db.count('Employee')
+	if count < 3:
+		messages.append(dict(
+			title=_('Create Employee Records'),
+			description=_('Create Employee records to manage leaves, expense claims and payroll'),
+			action=_('Make Employee'),
+			route='List/Employee'
+		))
+
+	return messages
\ No newline at end of file