Merge branch 'master' into develop
diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index ce16a6e..fa3fcc2 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -4,7 +4,7 @@
 import frappe
 from erpnext.hooks import regional_overrides
 
-__version__ = '9.0.3'
+__version__ = '9.0.4'
 
 def get_default_company(user=None):
 	'''Get default company for user'''
diff --git a/erpnext/accounts/party.py b/erpnext/accounts/party.py
index ba7ae32..69f40f8 100644
--- a/erpnext/accounts/party.py
+++ b/erpnext/accounts/party.py
@@ -320,11 +320,15 @@
 	from erpnext.accounts.doctype.tax_rule.tax_rule import get_tax_template, get_party_details
 	args = {
 		party_type.lower(): party,
-		"customer_group":	customer_group,
-		"supplier_type":	supplier_type,
 		"company":			company
 	}
 
+	if customer_group:
+		args['customer_group'] = customer_group
+
+	if supplier_type:
+		args['supplier_type'] = supplier_type
+
 	if billing_address or shipping_address:
 		args.update(get_party_details(party, party_type, {"billing_address": billing_address, \
 			"shipping_address": shipping_address }))
diff --git a/erpnext/controllers/item_variant.py b/erpnext/controllers/item_variant.py
index e556440..513b97f 100644
--- a/erpnext/controllers/item_variant.py
+++ b/erpnext/controllers/item_variant.py
@@ -207,7 +207,7 @@
 		if variant.attributes:
 			variant.description += "\n"
 			for d in variant.attributes:
-				variant.description += "<p>" + d.attribute + ": " + cstr(d.attribute_value) + "</p>"
+				variant.description += "<div>" + d.attribute + ": " + cstr(d.attribute_value) + "</div>"
 
 def make_variant_item_code(template_item_code, template_item_name, variant):
 	"""Uses template's item code and abbreviations to make variant's item code"""
diff --git a/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py b/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py
index bb200a9..698c4fb 100644
--- a/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py
+++ b/erpnext/hr/report/monthly_attendance_sheet/monthly_attendance_sheet.py
@@ -36,7 +36,7 @@
 			status_map = {"Present": "P", "Absent": "A", "Half Day": "HD", "On Leave": "L", "None": "", "Holiday":"<b>H</b>"}
 			if status == "None" and holiday_map:
 				emp_holiday_list = emp_det.holiday_list if emp_det.holiday_list else default_holiday_list
-				if (day+1) in holiday_map[emp_holiday_list]:
+				if emp_holiday_list in holiday_map and (day+1) in holiday_map[emp_holiday_list]:
 					status = "Holiday"
 			row.append(status_map[status])
 
@@ -45,7 +45,7 @@
 			elif status == "Absent":
 				total_a += 1
 			elif status == "On Leave":
-				total_l += 1	
+				total_l += 1
 			elif status == "Half Day":
 				total_p += 0.5
 				total_a += 0.5
diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py
index b308e09..93a41f3 100644
--- a/erpnext/manufacturing/doctype/bom/bom.py
+++ b/erpnext/manufacturing/doctype/bom/bom.py
@@ -95,8 +95,8 @@
 			self.validate_bom_currecny(item)
 
 			ret = self.get_bom_material_detail({
-				"item_code": item.item_code, 
-				"item_name": item.item_name, 
+				"item_code": item.item_code,
+				"item_name": item.item_name,
 				"bom_no": item.bom_no,
 				"stock_qty": item.stock_qty
 			})
@@ -312,7 +312,7 @@
 				li.append("{0} on row {1}".format(i.item_code, i.idx))
 			duplicate_list = '<br>' + '<br>'.join(li)
 
-			frappe.throw(_("Same item has been entered multiple times. {list}").format(list=duplicate_list))
+			frappe.throw(_("Same item has been entered multiple times. {0}").format(duplicate_list))
 
 	def check_recursion(self):
 		""" Check whether recursion occurs in any bom"""
@@ -346,7 +346,7 @@
 		count = 0
 		if not bom_list:
 			bom_list = []
-		
+
 		if self.name not in bom_list:
 			bom_list.append(self.name)