mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 11:19:09 +00:00
fix: BOM name issue (#44575)
fix: bom name issue
(cherry picked from commit b7a3c6b6ca)
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
@@ -175,6 +175,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