Merge branch 'develop'
diff --git a/erpnext/__version__.py b/erpnext/__version__.py
index 76a0d57..84acead 100644
--- a/erpnext/__version__.py
+++ b/erpnext/__version__.py
@@ -1,2 +1,2 @@
 from __future__ import unicode_literals
-__version__ = '5.0.7'
+__version__ = '5.0.8'
diff --git a/erpnext/config/accounts.py b/erpnext/config/accounts.py
index 1b29002..a5a4024 100644
--- a/erpnext/config/accounts.py
+++ b/erpnext/config/accounts.py
@@ -114,7 +114,7 @@
 				{
 					"type": "doctype",
 					"name": "POS Profile",
-					"label": _("Point-of-Sale Setting"),
+					"label": _("Point-of-Sale Profile"),
 					"description": _("Rules to calculate shipping amount for a sale")
 				},
 				{
diff --git a/erpnext/hooks.py b/erpnext/hooks.py
index 4a2e60d..750f811 100644
--- a/erpnext/hooks.py
+++ b/erpnext/hooks.py
@@ -5,7 +5,7 @@
 app_description = "Open Source Enterprise Resource Planning for Small and Midsized Organizations"
 app_icon = "icon-th"
 app_color = "#e74c3c"
-app_version = "5.0.7"
+app_version = "5.0.8"
 
 error_report_email = "support@erpnext.com"
 
diff --git a/erpnext/patches/v4_2/party_model.py b/erpnext/patches/v4_2/party_model.py
index cbb00cf..03eec16 100644
--- a/erpnext/patches/v4_2/party_model.py
+++ b/erpnext/patches/v4_2/party_model.py
@@ -19,20 +19,21 @@
 	receivable_payable_accounts = frappe._dict()
 
 	def _create_account(args):
-		account_id = frappe.db.get_value("Account", 
-				{"account_name": args["account_name"], "company": args["company"]})
-		if not account_id:
-			account = frappe.new_doc("Account")
-			account.is_group = 0
-			account.update(args)
-			account.insert()
+		if args["parent_account"]:
+			account_id = frappe.db.get_value("Account", 
+					{"account_name": args["account_name"], "company": args["company"]})
+			if not account_id:
+				account = frappe.new_doc("Account")
+				account.is_group = 0
+				account.update(args)
+				account.insert()
 			
-			account_id = account.name
+				account_id = account.name
 			
-			frappe.db.set_value("Company", args["company"], ("default_receivable_account"
-				if args["account_type"]=="Receivable" else "default_payable_account"), account_id)
+				frappe.db.set_value("Company", args["company"], ("default_receivable_account"
+					if args["account_type"]=="Receivable" else "default_payable_account"), account_id)
 
-		receivable_payable_accounts.setdefault(args["company"], {}).setdefault(args["account_type"], account_id)
+			receivable_payable_accounts.setdefault(args["company"], {}).setdefault(args["account_type"], account_id)
 
 	for company in frappe.db.sql_list("select name from tabCompany"):
 		_create_account({
diff --git a/erpnext/stock/report/stock_balance/stock_balance.json b/erpnext/stock/report/stock_balance/stock_balance.json
index ab331dc..5f7fde0 100644
--- a/erpnext/stock/report/stock_balance/stock_balance.json
+++ b/erpnext/stock/report/stock_balance/stock_balance.json
@@ -1,12 +1,12 @@
 {
- "add_total_row": 0, 
+ "add_total_row": 1, 
  "apply_user_permissions": 1, 
  "creation": "2014-10-10 17:58:11.577901", 
  "disabled": 0, 
  "docstatus": 0, 
  "doctype": "Report", 
  "is_standard": "Yes", 
- "modified": "2014-10-10 17:58:11.577901", 
+ "modified": "2015-05-22 02:16:24.614986", 
  "modified_by": "Administrator", 
  "module": "Stock", 
  "name": "Stock Balance", 
diff --git a/erpnext/utilities/transaction_base.py b/erpnext/utilities/transaction_base.py
index 9c73c60..60889c5 100644
--- a/erpnext/utilities/transaction_base.py
+++ b/erpnext/utilities/transaction_base.py
@@ -51,7 +51,8 @@
 			event.insert(ignore_permissions=True)
 
 			if frappe.db.exists("User", self.contact_by):
-				frappe.share.add("Event", event.name, self.contact_by)
+				frappe.share.add("Event", event.name, self.contact_by, 
+					flags={"ignore_share_permission": True})
 
 	def validate_uom_is_integer(self, uom_field, qty_fields):
 		validate_uom_is_integer(self, uom_field, qty_fields)
diff --git a/setup.py b/setup.py
index fb71b62..58be999 100644
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
 from setuptools import setup, find_packages
 
-version = "5.0.7"
+version = "5.0.8"
 
 with open("requirements.txt", "r") as f:
 	install_requires = f.readlines()