diff --git a/erpnext/__init__.py b/erpnext/__init__.py
index ce16a6e7db..fa3fcc2cce 100644
--- a/erpnext/__init__.py
+++ b/erpnext/__init__.py
@@ -4,7 +4,7 @@ import inspect
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 ba7ae323d4..69f40f8b25 100644
--- a/erpnext/accounts/party.py
+++ b/erpnext/accounts/party.py
@@ -320,11 +320,15 @@ def set_taxes(party, party_type, posting_date, company, customer_group=None, sup
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 ff11eb258d..cf2ae5fe19 100644
--- a/erpnext/controllers/item_variant.py
+++ b/erpnext/controllers/item_variant.py
@@ -195,7 +195,7 @@ def copy_attributes_to_variant(item, variant):
if variant.attributes:
variant.description += "\n"
for d in variant.attributes:
- variant.description += "
" + d.attribute + ": " + cstr(d.attribute_value) + "
"
+ variant.description += "" + d.attribute + ": " + cstr(d.attribute_value) + "
"
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 bb200a997e..698c4fbd7c 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 @@ def execute(filters=None):
status_map = {"Present": "P", "Absent": "A", "Half Day": "HD", "On Leave": "L", "None": "", "Holiday":"H"}
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 @@ def execute(filters=None):
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 b308e097ea..93a41f34e7 100644
--- a/erpnext/manufacturing/doctype/bom/bom.py
+++ b/erpnext/manufacturing/doctype/bom/bom.py
@@ -95,8 +95,8 @@ class BOM(WebsiteGenerator):
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 @@ class BOM(WebsiteGenerator):
li.append("{0} on row {1}".format(i.item_code, i.idx))
duplicate_list = '
' + '
'.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 @@ class BOM(WebsiteGenerator):
count = 0
if not bom_list:
bom_list = []
-
+
if self.name not in bom_list:
bom_list.append(self.name)