Merge branch 'hotfix'
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index b6cf86c..569f406 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -5,7 +5,7 @@
 from erpnext.hooks import regional_overrides
 from frappe.utils import getdate
 
-__version__ = '11.1.1'
+__version__ = '11.1.2'
 
 def get_default_company(user=None):
 	'''Get default company for user'''
diff --git a/erpnext/manufacturing/doctype/bom/bom.json b/erpnext/manufacturing/doctype/bom/bom.json
index 0cf7dc4..79c883a 100644
--- a/erpnext/manufacturing/doctype/bom/bom.json
+++ b/erpnext/manufacturing/doctype/bom/bom.json
@@ -642,6 +642,7 @@
    "bold": 0, 
    "collapsible": 0, 
    "columns": 0, 
+   "default": "Valuation Rate", 
    "fieldname": "rm_cost_as_per", 
    "fieldtype": "Select", 
    "hidden": 0, 
@@ -1977,7 +1978,7 @@
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2018-12-13 17:45:44.843197", 
+ "modified": "2019-01-30 16:39:34.353721", 
  "modified_by": "Administrator", 
  "module": "Manufacturing", 
  "name": "BOM", 
diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py
index 2317634..ba3b7192 100644
--- a/erpnext/manufacturing/doctype/bom/bom.py
+++ b/erpnext/manufacturing/doctype/bom/bom.py
@@ -163,6 +163,8 @@
 	def get_rm_rate(self, arg):
 		"""	Get raw material rate as per selected method, if bom exists takes bom cost """
 		rate = 0
+		if not self.rm_cost_as_per:
+			self.rm_cost_as_per = "Valuation Rate"
 
 		if arg.get('scrap_items'):
 			rate = self.get_valuation_rate(arg)
diff --git a/erpnext/patches/v11_1/setup_guardian_role.py b/erpnext/patches/v11_1/setup_guardian_role.py
index bb61f98..6ccfed9 100644
--- a/erpnext/patches/v11_1/setup_guardian_role.py
+++ b/erpnext/patches/v11_1/setup_guardian_role.py
@@ -3,8 +3,10 @@
 
 def execute():
 	if 'Education' in frappe.get_active_domains() and not frappe.db.exists("Role", "Guardian"):
-		frappe.new_doc({
-			"doctype": "Role",
+		doc = frappe.new_doc("Role")
+		doc.update({
 			"role_name": "Guardian",
 			"desk_access": 0
-		}).insert(ignore_permissions=True)
+		})
+
+		doc.insert(ignore_permissions=True)
diff --git a/erpnext/templates/pages/product_search.html b/erpnext/templates/pages/product_search.html
index d5a56b2..f9efd48 100644
--- a/erpnext/templates/pages/product_search.html
+++ b/erpnext/templates/pages/product_search.html
@@ -10,7 +10,7 @@
 <script>
 frappe.ready(function() {
 	var txt = frappe.utils.get_url_arg("search");
-	$(".search-results").html('{{ _("Search results for") + ": " + html2text(frappe.form_dict.search or "")|trim }}');
+	$(".search-results").html('{{ _("Search results for") + ": " + html2text(frappe.form_dict.search or "") | e | trim }}');
 	window.search = txt;
 	window.start = 0;
 	window.get_product_list();