From 8bc7fe7e55b755e5237967a652d63923a7dfe8d3 Mon Sep 17 00:00:00 2001 From: Raffael Meyer <14891507+barredterra@users.noreply.github.com> Date: Tue, 23 Sep 2025 22:13:35 +0200 Subject: [PATCH] fix: fallback to default selling price list only in selling transactions (#49705) --- erpnext/stock/get_item_details.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/erpnext/stock/get_item_details.py b/erpnext/stock/get_item_details.py index fcb5bbc4ffb..2be66e59bc9 100644 --- a/erpnext/stock/get_item_details.py +++ b/erpnext/stock/get_item_details.py @@ -118,8 +118,10 @@ def get_item_details( out.update(get_price_list_rate(ctx, item)) - if not out.price_list_rate and frappe.get_single_value( - "Selling Settings", "fallback_to_default_price_list" + if ( + not out.price_list_rate + and ctx.transaction_type == "selling" + and frappe.get_single_value("Selling Settings", "fallback_to_default_price_list") ): fallback_args = ctx.copy() fallback_args.price_list = frappe.get_single_value("Selling Settings", "selling_price_list")