fix: has_product_bundle util to only check for enabled bundles

(cherry picked from commit 3543f86c639cf7383c37a5ed9a61d5787c9ebad4)
This commit is contained in:
Gursheen Anand 2023-11-22 16:04:05 +05:30 committed by Mergify
parent fb517e823f
commit 5c12872f70

View File

@ -352,7 +352,7 @@ class SellingController(StockController):
def has_product_bundle(self, item_code):
return frappe.db.sql(
"""select name from `tabProduct Bundle`
where new_item_code=%s and docstatus != 2""",
where new_item_code=%s and disabled=0""",
item_code,
)