fix: fallback to default selling price list only in selling transactions (#49705)

This commit is contained in:
Raffael Meyer
2025-09-23 22:13:35 +02:00
committed by GitHub
parent ff78aaeb3b
commit 8bc7fe7e55

View File

@@ -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")