mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 02:01:21 +00:00
Merge pull request #44591 from frappe/mergify/bp/version-15/pr-44579
fix: BOM name issue (backport #44575) (backport #44579)
This commit is contained in:
@@ -176,9 +176,14 @@ class BOM(WebsiteGenerator):
|
|||||||
|
|
||||||
search_key = f"{self.doctype}-{self.item}%"
|
search_key = f"{self.doctype}-{self.item}%"
|
||||||
existing_boms = frappe.get_all(
|
existing_boms = frappe.get_all(
|
||||||
"BOM", filters={"name": ("like", search_key), "amended_from": ["is", "not set"]}, pluck="name"
|
"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"
|
||||||
|
)
|
||||||
|
|
||||||
if existing_boms:
|
if existing_boms:
|
||||||
index = self.get_next_version_index(existing_boms)
|
index = self.get_next_version_index(existing_boms)
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user