mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-20 21:24:02 +00:00
fix: adapt Product Bundle queries to v16 schema
On version-16-hotfix, Product Bundle has no `is_active` field and is not submittable (docstatus is always 0), so the backported queries crashed with "Unknown column 'is_active'" and would otherwise have matched no rows. Keep v16's `docstatus: 0` and derive activity from `disabled`, as the surrounding build_row calls already do. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -294,8 +294,8 @@ def get_product_bundle_component_rows(item):
|
||||
def get_product_bundle_parent_rows(item):
|
||||
rows = frappe.get_all(
|
||||
"Product Bundle",
|
||||
filters={"new_item_code": item, "docstatus": 1},
|
||||
fields=["name", "new_item_code", "is_active", "disabled"],
|
||||
filters={"new_item_code": item, "docstatus": 0},
|
||||
fields=["name", "new_item_code", "disabled"],
|
||||
order_by="name asc",
|
||||
)
|
||||
|
||||
@@ -463,8 +463,8 @@ def get_product_bundle_map(bundle_names):
|
||||
row.name: row
|
||||
for row in frappe.get_all(
|
||||
"Product Bundle",
|
||||
filters={"name": ["in", bundle_names], "docstatus": 1},
|
||||
fields=["name", "new_item_code", "is_active", "disabled"],
|
||||
filters={"name": ["in", bundle_names], "docstatus": 0},
|
||||
fields=["name", "new_item_code", "disabled"],
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user