From d506bda40b7b5b1d774e6fea64ffb33e37ad6999 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 af24f0215a..f601a2b055 100644 --- a/erpnext/stock/doctype/packed_item/packed_item.py +++ b/erpnext/stock/doctype/packed_item/packed_item.py @@ -68,6 +68,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, @@ -82,7 +85,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