From 4f8172ce8ac8ae256dafd640ebd9da07e6547621 Mon Sep 17 00:00:00 2001 From: Devin Slauenwhite Date: Tue, 24 May 2022 12:10:13 -0400 Subject: [PATCH] fix: check if item_code exists before fetching --- erpnext/stock/get_item_details.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index 324ff4f409e4..c6241f8df6d2 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -199,7 +199,7 @@ def process_args(args): if not args.get("price_list"): args.price_list = args.get("selling_price_list") or args.get("buying_price_list") - if args.barcode: + if not args.item_code and args.barcode: args.item_code = get_item_code(barcode=args.barcode) elif not args.item_code and args.serial_no: args.item_code = get_item_code(serial_no=args.serial_no)