Merge pull request #11119 from rohitwaghchaure/default_company_pos

[enhance] Provision to select company in the POS screen if company is not defined in the global defaults
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index 259c0f0..32dde37 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -4,7 +4,7 @@
 import frappe
 from erpnext.hooks import regional_overrides
 
-__version__ = '9.1.1'
+__version__ = '9.1.3'
 
 def get_default_company(user=None):
 	'''Get default company for user'''
diff --git a/erpnext/accounts/doctype/subscription/subscription.json b/erpnext/accounts/doctype/subscription/subscription.json
index dfdcbec..167a92f 100644
--- a/erpnext/accounts/doctype/subscription/subscription.json
+++ b/erpnext/accounts/doctype/subscription/subscription.json
@@ -844,7 +844,7 @@
  "issingle": 0, 
  "istable": 0, 
  "max_attachments": 0, 
- "modified": "2017-10-03 17:20:26.919630", 
+ "modified": "2017-10-10 17:28:10.105561", 
  "modified_by": "Administrator", 
  "module": "Accounts", 
  "name": "Subscription", 
diff --git a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js
index 86b1884..2532ed1 100644
--- a/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js
+++ b/erpnext/healthcare/doctype/patient_appointment/patient_appointment.js
@@ -183,16 +183,20 @@
 
 var btn_update_status = function(frm, status){
 	var doc = frm.doc;
-	frappe.call({
-		method:
-		"erpnext.healthcare.doctype.patient_appointment.patient_appointment.update_status",
-		args: {appointmentId: doc.name, status:status},
-		callback: function(data){
-			if(!data.exc){
-				cur_frm.reload_doc();
-			}
+	frappe.confirm(__('Are you sure you want to cancel this appointment?'),
+		function() {
+			frappe.call({
+				method:
+				"erpnext.healthcare.doctype.patient_appointment.patient_appointment.update_status",
+				args: {appointmentId: doc.name, status:status},
+				callback: function(data){
+					if(!data.exc){
+						frm.reload_doc();
+					}
+				}
+			});
 		}
-	});
+	);
 };
 
 var btn_invoice_consultation = function(frm){
diff --git a/erpnext/hr/doctype/upload_attendance/upload_attendance.js b/erpnext/hr/doctype/upload_attendance/upload_attendance.js
index f639898..776fd3c 100644
--- a/erpnext/hr/doctype/upload_attendance/upload_attendance.js
+++ b/erpnext/hr/doctype/upload_attendance/upload_attendance.js
@@ -39,6 +39,7 @@
 			args: {
 				method: 'erpnext.hr.doctype.upload_attendance.upload_attendance.upload'
 			},
+			no_socketio: true,
 			sample_url: "e.g. http://example.com/somefile.csv",
 			callback: function(attachment, r) {
 				var $log_wrapper = $(cur_frm.fields_dict.import_log.wrapper).empty();
diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py
index 93a41f3..ead5d33 100644
--- a/erpnext/manufacturing/doctype/bom/bom.py
+++ b/erpnext/manufacturing/doctype/bom/bom.py
@@ -128,7 +128,7 @@
 			 'uom'			: item and args['stock_uom'] or '',
  			 'conversion_factor': 1,
 			 'bom_no'		: args['bom_no'],
-			 'rate'			: rate / self.conversion_rate,
+			 'rate'			: rate / self.conversion_rate if self.conversion_rate else rate,
 			 'qty'			: args.get("qty") or args.get("stock_qty") or 1,
 			 'stock_qty'	: args.get("qty") or args.get("stock_qty") or 1,
 			 'base_rate'	: rate
@@ -374,7 +374,7 @@
 			if d.workstation:
 				if not d.hour_rate:
 					hour_rate = flt(frappe.db.get_value("Workstation", d.workstation, "hour_rate"))
-					d.hour_rate = hour_rate / flt(self.conversion_rate)
+					d.hour_rate = hour_rate / flt(self.conversion_rate) if self.conversion_rate else hour_rate
 
 			if d.hour_rate and d.time_in_mins:
 				d.base_hour_rate = flt(d.hour_rate) * flt(self.conversion_rate)
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 113c402..0b9e826 100644
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -449,3 +449,4 @@
 erpnext.patches.v8_9.set_default_fields_in_variant_settings
 erpnext.patches.v8_9.update_billing_gstin_for_indian_account
 erpnext.patches.v9_0.fix_subscription_next_date
+erpnext.patches.v9_0.add_healthcare_domain
diff --git a/erpnext/patches/v9_0/add_healthcare_domain.py b/erpnext/patches/v9_0/add_healthcare_domain.py
new file mode 100644
index 0000000..45fceb1
--- /dev/null
+++ b/erpnext/patches/v9_0/add_healthcare_domain.py
@@ -0,0 +1,14 @@
+# Copyright (c) 2017, Frappe and Contributors
+# License: GNU General Public License v3. See license.txt
+
+from __future__ import unicode_literals
+import frappe
+from frappe import _
+
+def execute():
+	domain = _('Healthcare')
+	if not frappe.db.exists('Domain', domain):
+		frappe.get_doc({
+			'doctype': 'Domain',
+			'domain': domain
+		}).insert(ignore_permissions=True)
\ No newline at end of file
diff --git a/erpnext/schools/doctype/fees/fees.py b/erpnext/schools/doctype/fees/fees.py
index a2fcecc..42b329e 100644
--- a/erpnext/schools/doctype/fees/fees.py
+++ b/erpnext/schools/doctype/fees/fees.py
@@ -50,6 +50,7 @@
 			select g.email_address
 			from `tabGuardian` g, `tabStudent Guardian` sg
 			where g.name = sg.guardian and sg.parent = %s and sg.parenttype = 'Student'
+			and ifnull(g.email_address, '')!=''
 		""", self.student)
 
 		student_email_id = frappe.db.get_value("Student", self.student, "student_email_id")
diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.js b/erpnext/selling/page/point_of_sale/point_of_sale.js
index 5a66ef8..2e09ca5 100644
--- a/erpnext/selling/page/point_of_sale/point_of_sale.js
+++ b/erpnext/selling/page/point_of_sale/point_of_sale.js
@@ -102,16 +102,13 @@
 						if (!this.payment) {
 							this.make_payment_modal();
 						} else {
-							const mop_field = this.payment.default_mop;
-							let amount = 0.0;
 							this.frm.doc.payments.map(p => {
-								if (p.mode_of_payment == mop_field) {
-									amount = p.amount;
-									return;
+								if (p.amount) {
+									this.payment.dialog.set_value(p.mode_of_payment, p.amount);
 								}
 							});
 
-							this.payment.dialog.set_value(mop_field, flt(amount));
+							this.payment.set_title();
 						}
 						this.payment.open_modal();
 					}
@@ -1208,12 +1205,7 @@
 
 	make() {
 		this.set_flag();
-
-		let title = __('Total Amount {0}',
-			[format_currency(this.frm.doc.grand_total, this.frm.doc.currency)]);
-
 		this.dialog = new frappe.ui.Dialog({
-			title: title,
 			fields: this.get_fields(),
 			width: 800
 		});
@@ -1236,6 +1228,13 @@
 		});
 	}
 
+	set_title() {
+		let title = __('Total Amount {0}',
+			[format_currency(this.frm.doc.grand_total, this.frm.doc.currency)]);
+
+		this.dialog.set_title(title);
+	}
+
 	bind_events() {
 		var me = this;
 		$(this.dialog.body).find('.input-with-feedback').focusin(function() {
@@ -1257,10 +1256,6 @@
 		const me = this;
 
 		let fields = this.frm.doc.payments.map(p => {
-			if (p.default) {
-				this.default_mop = p.mode_of_payment;
-			}
-
 			return {
 				fieldtype: 'Currency',
 				label: __(p.mode_of_payment),
diff --git a/erpnext/selling/page/point_of_sale/point_of_sale.py b/erpnext/selling/page/point_of_sale/point_of_sale.py
index 5694ad9..b92c653 100644
--- a/erpnext/selling/page/point_of_sale/point_of_sale.py
+++ b/erpnext/selling/page/point_of_sale/point_of_sale.py
@@ -9,6 +9,8 @@
 def get_items(start, page_length, price_list, item_group, search_value=""):
 	serial_no = ""
 	batch_no = ""
+	barcode = ""
+
 	item_code = search_value
 	if not frappe.db.exists('Item Group', item_group):
 		item_group = get_root_of('Item Group')
@@ -24,7 +26,12 @@
 			if batch_no_data:
 				batch_no, item_code = batch_no_data
 
-	item_code, condition = get_conditions(item_code, serial_no, batch_no)
+		if not serial_no and not batch_no:
+			barcode_data = frappe.db.get_value('Item', {'barcode': search_value}, ['name', 'barcode'])
+			if barcode_data:
+				item_code, barcode = barcode_data
+
+	item_code, condition = get_conditions(item_code, serial_no, batch_no, barcode)
 
 	lft, rgt = frappe.db.get_value('Item Group', item_group, ['lft', 'rgt'])
 	# locate function is used to sort by closest match from the beginning of the value
@@ -62,12 +69,12 @@
 
 	return res
 
-def get_conditions(item_code, serial_no, batch_no):
-	if serial_no or batch_no:
+def get_conditions(item_code, serial_no, batch_no, barcode):
+	if serial_no or batch_no or barcode:
 		return frappe.db.escape(item_code), "i.item_code = %(item_code)s"
 
 	condition = """(i.item_code like %(item_code)s
-			or i.item_name like %(item_code)s or i.barcode like %(item_code)s)"""
+			or i.item_name like %(item_code)s)"""
 
 	return '%%%s%%'%(frappe.db.escape(item_code)), condition
 
diff --git a/erpnext/setup/setup_wizard/healthcare.py b/erpnext/setup/setup_wizard/healthcare.py
index 43a0237..b321c29 100644
--- a/erpnext/setup/setup_wizard/healthcare.py
+++ b/erpnext/setup/setup_wizard/healthcare.py
@@ -29,48 +29,53 @@
 
 
 def create_medical_departments():
-	depts = ["Accident and emergency care" ,"Anaesthetics", "Biochemistry", "Cardiology", "Dermatology",
-				"Diagnostic imaging", "ENT", "Gastroenterology", "General Surgery", "Gynaecology",
-				"Haematology", "Maternity", "Microbiology", "Nephrology", "Neurology", "Oncology",
-				 "Orthopaedics", "Pathology", "Physiotherapy", "Rheumatology", "Serology", "Urology"]
-	for d in depts:
+	departments = [
+		"Accident And Emergency Care" ,"Anaesthetics", "Biochemistry", "Cardiology", "Dermatology",
+		"Diagnostic Imaging", "ENT", "Gastroenterology", "General Surgery", "Gynaecology",
+		"Haematology", "Maternity", "Microbiology", "Nephrology", "Neurology", "Oncology",
+		"Orthopaedics", "Pathology", "Physiotherapy", "Rheumatology", "Serology", "Urology"
+	]
+	for department in departments:
 		mediacal_department = frappe.new_doc("Medical Department")
-		mediacal_department.department = d
+		mediacal_department.department = _(department)
 		try:
 			mediacal_department.save()
 		except frappe.DuplicateEntryError:
 			pass
 
 def create_antibiotics():
-	abt = ["Amoxicillin", "Ampicillin", "Bacampicillin", "Carbenicillin", "Cloxacillin", "Dicloxacillin",
-	 "Flucloxacillin", "Mezlocillin", "Nafcillin", "Oxacillin", "Penicillin G", "Penicillin V",
-	 "Piperacillin", "Pivampicillin", "Pivmecillinam", "Ticarcillin", "Cefacetrile (cephacetrile)",
-	 "Cefadroxil (cefadroxyl)", "Cefalexin (cephalexin)", "Cefaloglycin (cephaloglycin)",
-	 "Cefalonium (cephalonium)", "Cefaloridine (cephaloradine)", "Cefalotin (cephalothin)",
-	 "Cefapirin (cephapirin)", "Cefatrizine", "Cefazaflur", "Cefazedone", "Cefazolin (cephazolin)",
-	 "Cefradine (cephradine)", "Cefroxadine", "Ceftezole", "Cefaclor", "Cefamandole", "Cefmetazole",
-	 "Cefonicid", "Cefotetan", "Cefoxitin", "Cefprozil (cefproxil)", "Cefuroxime", "Cefuzonam",
-	 "Cefcapene", "Cefdaloxime", "Cefdinir", "Cefditoren", "Cefetamet", "Cefixime", "Cefmenoxime",
-	 "Cefodizime", "Cefotaxime", "Cefpimizole", "Cefpodoxime", "Cefteram", "Ceftibuten", "Ceftiofur",
-	 "Ceftiolene", "Ceftizoxime", "Ceftriaxone", "Cefoperazone", "Ceftazidime", "Cefclidine", "Cefepime",
-	 "Cefluprenam", "Cefoselis", "Cefozopran", "Cefpirome", "Cefquinome", "Ceftobiprole", "Ceftaroline",
-	 "Cefaclomezine","Cefaloram", "Cefaparole", "Cefcanel", "Cefedrolor", "Cefempidone", "Cefetrizole",
-	 "Cefivitril", "Cefmatilen", "Cefmepidium", "Cefovecin", "Cefoxazole", "Cefrotil", "Cefsumide",
-	 "Cefuracetime", "Ceftioxide", "Ceftazidime/Avibactam", "Ceftolozane/Tazobactam", "Aztreonam",
-	 "Imipenem", "Imipenem/cilastatin", "Doripenem", "Meropenem", "Ertapenem", "Azithromycin",
-	 "Erythromycin", "Clarithromycin", "Dirithromycin", "Roxithromycin", "Telithromycin", "Clindamycin",
-	 "Lincomycin", "Pristinamycin", "Quinupristin/dalfopristin", "Amikacin", "Gentamicin", "Kanamycin",
-	 "Neomycin", "Netilmicin", "Paromomycin", "Streptomycin", "Tobramycin", "Flumequine", "Nalidixic acid",
-	 "Oxolinic acid", "Piromidic acid", "Pipemidic acid", "Rosoxacin", "Ciprofloxacin", "Enoxacin",
-	 "Lomefloxacin", "Nadifloxacin", "Norfloxacin", "Ofloxacin", "Pefloxacin", "Rufloxacin", "Balofloxacin",
-	 "Gatifloxacin", "Grepafloxacin", "Levofloxacin", "Moxifloxacin", "Pazufloxacin", "Sparfloxacin",
-	 "Temafloxacin", "Tosufloxacin", "Besifloxacin", "Clinafloxacin", "Gemifloxacin",
-	 "Sitafloxacin", "Trovafloxacin", "Prulifloxacin", "Sulfamethizole", "Sulfamethoxazole",
-	 "Sulfisoxazole", "Trimethoprim-Sulfamethoxazole", "Demeclocycline", "Doxycycline", "Minocycline",
-	 "Oxytetracycline", "Tetracycline", "Tigecycline", "Chloramphenicol", "Metronidazole",
-	 "Tinidazole", "Nitrofurantoin", "Vancomycin", "Teicoplanin", "Telavancin", "Linezolid",
-	 "Cycloserine 2", "Rifampin", "Rifabutin", "Rifapentine", "Rifalazil", "Bacitracin", "Polymyxin B",
-	 "Viomycin", "Capreomycin"]
+	abt = [
+		"Amoxicillin", "Ampicillin", "Bacampicillin", "Carbenicillin", "Cloxacillin", "Dicloxacillin",
+		"Flucloxacillin", "Mezlocillin", "Nafcillin", "Oxacillin", "Penicillin G", "Penicillin V",
+		"Piperacillin", "Pivampicillin", "Pivmecillinam", "Ticarcillin", "Cefacetrile (cephacetrile)",
+		"Cefadroxil (cefadroxyl)", "Cefalexin (cephalexin)", "Cefaloglycin (cephaloglycin)",
+		"Cefalonium (cephalonium)", "Cefaloridine (cephaloradine)", "Cefalotin (cephalothin)",
+		"Cefapirin (cephapirin)", "Cefatrizine", "Cefazaflur", "Cefazedone", "Cefazolin (cephazolin)",
+		"Cefradine (cephradine)", "Cefroxadine", "Ceftezole", "Cefaclor", "Cefamandole", "Cefmetazole",
+		"Cefonicid", "Cefotetan", "Cefoxitin", "Cefprozil (cefproxil)", "Cefuroxime", "Cefuzonam",
+		"Cefcapene", "Cefdaloxime", "Cefdinir", "Cefditoren", "Cefetamet", "Cefixime", "Cefmenoxime",
+		"Cefodizime", "Cefotaxime", "Cefpimizole", "Cefpodoxime", "Cefteram", "Ceftibuten", "Ceftiofur",
+		"Ceftiolene", "Ceftizoxime", "Ceftriaxone", "Cefoperazone", "Ceftazidime", "Cefclidine", "Cefepime",
+		"Cefluprenam", "Cefoselis", "Cefozopran", "Cefpirome", "Cefquinome", "Ceftobiprole", "Ceftaroline",
+		"Cefaclomezine","Cefaloram", "Cefaparole", "Cefcanel", "Cefedrolor", "Cefempidone", "Cefetrizole",
+		"Cefivitril", "Cefmatilen", "Cefmepidium", "Cefovecin", "Cefoxazole", "Cefrotil", "Cefsumide",
+		"Cefuracetime", "Ceftioxide", "Ceftazidime/Avibactam", "Ceftolozane/Tazobactam", "Aztreonam",
+		"Imipenem", "Imipenem/cilastatin", "Doripenem", "Meropenem", "Ertapenem", "Azithromycin",
+		"Erythromycin", "Clarithromycin", "Dirithromycin", "Roxithromycin", "Telithromycin", "Clindamycin",
+		"Lincomycin", "Pristinamycin", "Quinupristin/dalfopristin", "Amikacin", "Gentamicin", "Kanamycin",
+		"Neomycin", "Netilmicin", "Paromomycin", "Streptomycin", "Tobramycin", "Flumequine", "Nalidixic acid",
+		"Oxolinic acid", "Piromidic acid", "Pipemidic acid", "Rosoxacin", "Ciprofloxacin", "Enoxacin",
+		"Lomefloxacin", "Nadifloxacin", "Norfloxacin", "Ofloxacin", "Pefloxacin", "Rufloxacin", "Balofloxacin",
+		"Gatifloxacin", "Grepafloxacin", "Levofloxacin", "Moxifloxacin", "Pazufloxacin", "Sparfloxacin",
+		"Temafloxacin", "Tosufloxacin", "Besifloxacin", "Clinafloxacin", "Gemifloxacin",
+		"Sitafloxacin", "Trovafloxacin", "Prulifloxacin", "Sulfamethizole", "Sulfamethoxazole",
+		"Sulfisoxazole", "Trimethoprim-Sulfamethoxazole", "Demeclocycline", "Doxycycline", "Minocycline",
+		"Oxytetracycline", "Tetracycline", "Tigecycline", "Chloramphenicol", "Metronidazole",
+		"Tinidazole", "Nitrofurantoin", "Vancomycin", "Teicoplanin", "Telavancin", "Linezolid",
+		"Cycloserine 2", "Rifampin", "Rifabutin", "Rifapentine", "Rifalazil", "Bacitracin", "Polymyxin B",
+		"Viomycin", "Capreomycin"
+	]
+
 	for a in abt:
 		antibiotic = frappe.new_doc("Antibiotic")
 		antibiotic.antibiotic_name = a
@@ -190,21 +195,21 @@
 
 def create_lab_test_items():
 	records = [
-		{"doctype": "Item", "item_code": "MCH", "item_name": "MCH", "item_group": "Laboratory",
+		{"doctype": "Item", "item_code": "MCH", "item_name": "MCH", "item_group": _("Laboratory"),
 			"stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
-		{"doctype": "Item", "item_code": "LDL", "item_name": "LDL", "item_group": "Laboratory",
+		{"doctype": "Item", "item_code": "LDL", "item_name": "LDL", "item_group": _("Laboratory"),
 			"stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
-		{"doctype": "Item", "item_code": "GTT", "item_name": "GTT", "item_group": "Laboratory",
+		{"doctype": "Item", "item_code": "GTT", "item_name": "GTT", "item_group": _("Laboratory"),
 			"stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
-		{"doctype": "Item", "item_code": "HDL", "item_name": "HDL", "item_group": "Laboratory",
+		{"doctype": "Item", "item_code": "HDL", "item_name": "HDL", "item_group": _("Laboratory"),
 			"stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
-		{"doctype": "Item", "item_code": "BILT", "item_name": "BILT", "item_group": "Laboratory",
+		{"doctype": "Item", "item_code": "BILT", "item_name": "BILT", "item_group": _("Laboratory"),
 			"stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
-		{"doctype": "Item", "item_code": "BILD", "item_name": "BILD", "item_group": "Laboratory",
+		{"doctype": "Item", "item_code": "BILD", "item_name": "BILD", "item_group": _("Laboratory"),
 			"stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
-		{"doctype": "Item", "item_code": "BP", "item_name": "BP", "item_group": "Laboratory",
+		{"doctype": "Item", "item_code": "BP", "item_name": "BP", "item_group": _("Laboratory"),
 			"stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1},
-		{"doctype": "Item", "item_code": "BS", "item_name": "BS", "item_group": "Laboratory",
+		{"doctype": "Item", "item_code": "BS", "item_name": "BS", "item_group": _("Laboratory"),
 			"stock_uom": _("Unit"), "is_stock_item": 0, "is_purchase_item": 0, "is_sales_item": 1}
 	]
 	insert_record(records)
@@ -212,43 +217,43 @@
 def create_lab_test_template():
 	records = [
 		{"doctype": "Lab Test Template", "name": "MCH","test_name": "MCH","test_code": "MCH",
-		"test_group": "Laboratory","department": "Haematology","item": "MCH",
+		"test_group": _("Laboratory"),"department": _("Haematology"),"item": "MCH",
 		"test_template_type": "Single","is_billable": 1,"test_rate": 0.0,"test_uom": "Microgram",
 		"test_normal_range": "27 - 32 Microgram",
 		"sensitivity": 0,"test_description": "Mean Corpuscular Hemoglobin"},
 		{"doctype": "Lab Test Template", "name": "LDL","test_name": "LDL (Serum)","test_code": "LDL",
-		"test_group": "Laboratory","department": "Biochemistry",
+		"test_group": _("Laboratory"),"department": _("Biochemistry"),
 		"item": "LDL","test_template_type": "Single",
 		"is_billable": 1,"test_rate": 0.0,"test_uom": "mg / dl","test_normal_range": "70 - 160 mg/dlLow-density Lipoprotein (LDL)",
 		"sensitivity": 0,"test_description": "Low-density Lipoprotein (LDL)"},
 		{"doctype": "Lab Test Template", "name": "GTT","test_name": "GTT","test_code": "GTT",
-		"test_group": "Laboratory","department": "Haematology",
+		"test_group": _("Laboratory"),"department": _("Haematology"),
 		"item": "GTT","test_template_type": "Single",
 		"is_billable": 1,"test_rate": 0.0,"test_uom": "mg / dl","test_normal_range": "Less than 85 mg/dl",
 		"sensitivity": 0,"test_description": "Glucose Tolerance Test"},
 		{"doctype": "Lab Test Template", "name": "HDL","test_name": "HDL (Serum)","test_code": "HDL",
-		"test_group": "Laboratory","department": "Biochemistry",
+		"test_group": _("Laboratory"),"department": _("Biochemistry"),
 		"item": "HDL","test_template_type": "Single",
 		"is_billable": 1,"test_rate": 0.0,"test_uom": "mg / dl","test_normal_range": "35 - 65 mg/dl",
 		"sensitivity": 0,"test_description": "High-density Lipoprotein (HDL)"},
 		{"doctype": "Lab Test Template", "name": "BILT","test_name": "Bilirubin Total","test_code": "BILT",
-		"test_group": "Laboratory","department": "Biochemistry",
+		"test_group": _("Laboratory"),"department": _("Biochemistry"),
 		"item": "BILT","test_template_type": "Single",
 		"is_billable": 1,"test_rate": 0.0,"test_uom": "mg / dl","test_normal_range": "0.2 - 1.2 mg / dl",
 		"sensitivity": 0,"test_description": "Bilirubin Total"},
 		{"doctype": "Lab Test Template", "name": "BILD","test_name": "Bilirubin Direct","test_code": "BILD",
-		"test_group": "Laboratory","department": "Biochemistry",
+		"test_group": _("Laboratory"),"department": _("Biochemistry"),
 		"item": "BILD","test_template_type": "Single",
 		"is_billable": 1,"test_rate": 0.0,"test_uom": "mg / dl","test_normal_range": "0.4 mg / dl",
 		"sensitivity": 0,"test_description": "Bilirubin Direct"},
 
 		{"doctype": "Lab Test Template", "name": "BP","test_name": "Bile Pigment","test_code": "BP",
-		"test_group": "Laboratory","department": "Pathology",
+		"test_group": _("Laboratory"),"department": _("Pathology"),
 		"item": "BP","test_template_type": "Single",
 		"is_billable": 1,"test_rate": 0.0,"test_uom": "","test_normal_range": "",
 		"sensitivity": 0,"test_description": "Bile Pigment"},
 		{"doctype": "Lab Test Template", "name": "BS","test_name": "Bile Salt","test_code": "BS",
-		"test_group": "Laboratory","department": "Pathology",
+		"test_group": _("Laboratory"),"department": _("Pathology"),
 		"item": "BS","test_template_type": "Single",
 		"is_billable": 1,"test_rate": 0.0,"test_uom": "","test_normal_range": "",
 		"sensitivity": 0,"test_description": "Bile Salt"}
@@ -257,12 +262,12 @@
 
 def create_sensitivity():
 	records = [
-		{"doctype": "Sensitivity", "sensitivity": "Low Sensitivity"},
-		{"doctype": "Sensitivity", "sensitivity": "High Sensitivity"},
-		{"doctype": "Sensitivity", "sensitivity": "Moderate Sensitivity"},
-		{"doctype": "Sensitivity", "sensitivity": "Susceptible"},
-		{"doctype": "Sensitivity", "sensitivity": "Resistant"},
-		{"doctype": "Sensitivity", "sensitivity": "Intermediate"}
+		{"doctype": "Sensitivity", "sensitivity": _("Low Sensitivity")},
+		{"doctype": "Sensitivity", "sensitivity": _("High Sensitivity")},
+		{"doctype": "Sensitivity", "sensitivity": _("Moderate Sensitivity")},
+		{"doctype": "Sensitivity", "sensitivity": _("Susceptible")},
+		{"doctype": "Sensitivity", "sensitivity": _("Resistant")},
+		{"doctype": "Sensitivity", "sensitivity": _("Intermediate")}
 	]
 	insert_record(records)