mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 23:52:57 +00:00
@@ -178,6 +178,11 @@ class BOM(WebsiteGenerator):
|
||||
# ignore amended documents while calculating current index
|
||||
|
||||
search_key = f"{self.doctype}-{self.item}%"
|
||||
existing_boms = frappe.get_all(
|
||||
"BOM", filters={"name": search_key, "amended_from": ["is", "not set"]}, pluck="name"
|
||||
)
|
||||
|
||||
if not existing_boms:
|
||||
existing_boms = frappe.get_all(
|
||||
"BOM", filters={"name": ("like", search_key), "amended_from": ["is", "not set"]}, pluck="name"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user