From 9977212d5911fd2fc13d702f66ee8f9bbee6784b Mon Sep 17 00:00:00 2001 From: Corentin Forler Date: Fri, 28 Feb 2025 15:32:03 +0100 Subject: [PATCH] fix: Fix editable bundle rates not checking correct field --- erpnext/stock/doctype/packed_item/packed_item.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/erpnext/stock/doctype/packed_item/packed_item.py b/erpnext/stock/doctype/packed_item/packed_item.py index 69e1622f6bc..6891c22f9cc 100644 --- a/erpnext/stock/doctype/packed_item/packed_item.py +++ b/erpnext/stock/doctype/packed_item/packed_item.py @@ -77,6 +77,9 @@ def make_packing_list(doc): for item_row in doc.get("items"): if is_product_bundle(item_row.item_code): + editable_bundle_item_rates = frappe.db.get_value( + "Product Bundle", {"new_item_code": item_row.item_code}, "editable_bundle_item_rates" + ) for bundle_item in get_product_bundle_items(item_row.item_code): pi_row = add_packed_item_row( doc=doc, @@ -91,7 +94,7 @@ def make_packing_list(doc): update_packed_item_price_data(pi_row, item_data, doc) update_packed_item_from_cancelled_doc(item_row, bundle_item, pi_row, doc) - if bundle_item.editable_bundle_item_rates: # create/update bundle item wise price dict + if editable_bundle_item_rates: # create/update bundle item wise price dict update_product_bundle_rate(parent_items_price, pi_row, item_row) if parent_items_price: -- GitLab