fix: add validation in bom creator function (backport #53364) (#53368)

* fix: add validation in bom creator function (#53364)

(cherry picked from commit 9c0c39381f)

# Conflicts:
#	erpnext/manufacturing/doctype/bom_creator/bom_creator.py

* chore: resolve conflicts

---------

Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
This commit is contained in:
mergify[bot]
2026-03-12 09:35:19 +00:00
committed by GitHub
parent 42cfbae782
commit 4af54a7ac7

View File

@@ -562,6 +562,9 @@ def delete_node(**kwargs):
@frappe.whitelist()
def edit_bom_creator(doctype, docname, data, parent):
if not frappe.has_permission(doctype=doctype, ptype="write", parent_doctype="BOM Creator"):
frappe.throw(_("You do not have permission to edit this document"), frappe.PermissionError)
if isinstance(data, str):
data = frappe.parse_json(data)