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)