From 76dce2eddc69a1df8277028510a9dbe6ab4acd7d Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Tue, 29 Mar 2022 11:21:03 +0530 Subject: [PATCH 1/2] fix: use `name` for links not `item_code` (#30462) --- .../report/item_wise_sales_history/item_wise_sales_history.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.py b/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.py index da0098409b..12ca7b3ff8 100644 --- a/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.py +++ b/erpnext/selling/report/item_wise_sales_history/item_wise_sales_history.py @@ -177,11 +177,11 @@ def get_customer_details(): def get_item_details(): - details = frappe.db.get_all("Item", fields=["item_code", "item_name", "item_group"]) + details = frappe.db.get_all("Item", fields=["name", "item_name", "item_group"]) item_details = {} for d in details: item_details.setdefault( - d.item_code, frappe._dict({"item_name": d.item_name, "item_group": d.item_group}) + d.name, frappe._dict({"item_name": d.item_name, "item_group": d.item_group}) ) return item_details From d29e314c812e89fbb68090b5eca8fba1229af687 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Tue, 29 Mar 2022 11:47:28 +0530 Subject: [PATCH 2/2] ci: pin click for black (#30464) [skip ci] --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cba6759f61..dc3011f050 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,6 +30,7 @@ repos: rev: 9cb0a69f4d0030cdf687eddf314468b39ed54119 hooks: - id: black + additional_dependencies: ['click==8.0.4'] - repo: https://github.com/timothycrosley/isort rev: 5.9.1