From 6358370735c432352fdc0109d08ed7a943d19b03 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Tue, 21 May 2019 01:46:55 +0530 Subject: [PATCH 1/2] fix: item group not disaplying in the website if shopping cart is disabled --- erpnext/setup/doctype/item_group/item_group.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/setup/doctype/item_group/item_group.py b/erpnext/setup/doctype/item_group/item_group.py index 37df150e17..cab21162c7 100644 --- a/erpnext/setup/doctype/item_group/item_group.py +++ b/erpnext/setup/doctype/item_group/item_group.py @@ -113,8 +113,9 @@ def get_product_list_for_group(product_group=None, start=0, limit=10, search=Non data = frappe.db.sql(query, {"product_group": product_group,"search": search, "today": nowdate()}, as_dict=1) data = adjust_qty_for_expired_items(data) - for item in data: - set_product_info_for_website(item) + if cint(frappe.db.get_single_value("Shopping Cart Settings", "enabled")): + for item in data: + set_product_info_for_website(item) return data From 68a145667269872e9ef7735606be787f7406cc94 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Wed, 22 May 2019 13:17:46 +0530 Subject: [PATCH 2/2] fix: removed translation for customer type and tax charge type --- erpnext/regional/italy/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/regional/italy/utils.py b/erpnext/regional/italy/utils.py index 88e7c3e6f4..0c421244ca 100644 --- a/erpnext/regional/italy/utils.py +++ b/erpnext/regional/italy/utils.py @@ -75,7 +75,7 @@ def prepare_invoice(invoice, progressive_number): invoice.tax_data = tax_data #Check if stamp duty (Bollo) of 2 EUR exists. - stamp_duty_charge_row = next((tax for tax in invoice.taxes if tax.charge_type == _("Actual") and tax.tax_amount == 2.0 ), None) + stamp_duty_charge_row = next((tax for tax in invoice.taxes if tax.charge_type == "Actual" and tax.tax_amount == 2.0 ), None) if stamp_duty_charge_row: invoice.stamp_duty = stamp_duty_charge_row.tax_amount @@ -222,7 +222,7 @@ def sales_invoice_validate(doc): #Validate customer details customer = frappe.get_doc("Customer", doc.customer) - if customer.customer_type == _("Individual"): + if customer.customer_type == "Individual": doc.customer_fiscal_code = customer.fiscal_code if not doc.customer_fiscal_code: frappe.throw(_("Please set Fiscal Code for the customer '%s'" % doc.customer), title=_("E-Invoicing Information Missing"))