From 77352ae47e1fcf3b755899004d4f8247ae00b470 Mon Sep 17 00:00:00 2001 From: GangaManoj Date: Wed, 25 Aug 2021 00:12:43 +0530 Subject: [PATCH] fix: Only update Product Bundle prices if 'Calculate Product Bundle Price based on Child Items' Rates' is enabled --- erpnext/stock/doctype/packed_item/packed_item.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/packed_item/packed_item.py b/erpnext/stock/doctype/packed_item/packed_item.py index ea963ed8e8..a42bde2a57 100644 --- a/erpnext/stock/doctype/packed_item/packed_item.py +++ b/erpnext/stock/doctype/packed_item/packed_item.py @@ -85,7 +85,9 @@ def make_packing_list(doc): parent_items.append([d.item_code, d.name]) cleanup_packing_list(doc, parent_items) - update_product_bundle_price(doc, parent_items) + + if frappe.db.get_single_value("Selling Settings", "editable_bundle_item_rates"): + update_product_bundle_price(doc, parent_items) def cleanup_packing_list(doc, parent_items): """Remove all those child items which are no longer present in main item table"""