From 2b87d100fa9d71acece3cab5945869bd58314fed Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Thu, 28 Sep 2017 15:21:36 +0530 Subject: [PATCH 1/5] [fix] https://github.com/frappe/erpnext/issues/10956 --- .../monthly_attendance_sheet/monthly_attendance_sheet.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 From 3c14c5a16c060792f872ddd658245040c34efdfa Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 29 Sep 2017 13:21:22 +0530 Subject: [PATCH 2/5] [fix] tax_rule.py args --- erpnext/accounts/party.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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 })) From 80d24f83f86ceabc565477d3e10401c159f76ff3 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 29 Sep 2017 15:39:03 +0530 Subject: [PATCH 3/5] [fix] item variant description --- erpnext/controllers/item_variant.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/item_variant.py b/erpnext/controllers/item_variant.py index 967c1339f1..ca3ddfdfa5 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""" From d3a48a83fd9fde70c4610ae48889806965216310 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 29 Sep 2017 15:50:17 +0530 Subject: [PATCH 4/5] [fix] bom.py, dont use keyword --- erpnext/manufacturing/doctype/bom/bom.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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) From e1a4b3e4bc8bb6a33fb1ea2579343564ae860743 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 29 Sep 2017 16:52:01 +0600 Subject: [PATCH 5/5] bumped to version 9.0.4 --- erpnext/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'''