Permissions issue in BOM tree
This commit is contained in:
parent
fbc3df3247
commit
8fe8d1758a
@ -632,7 +632,10 @@ def get_children(doctype, parent=None, is_root=False, **filters):
|
|||||||
return
|
return
|
||||||
|
|
||||||
if frappe.form_dict.parent:
|
if frappe.form_dict.parent:
|
||||||
bom_items = frappe.get_list('BOM Item',
|
bom_doc = frappe.get_doc("BOM", frappe.form_dict.parent)
|
||||||
|
frappe.has_permission("BOM", doc=bom_doc, throw=True)
|
||||||
|
|
||||||
|
bom_items = frappe.get_all('BOM Item',
|
||||||
fields=['item_code', 'bom_no as value', 'stock_qty'],
|
fields=['item_code', 'bom_no as value', 'stock_qty'],
|
||||||
filters=[['parent', '=', frappe.form_dict.parent]],
|
filters=[['parent', '=', frappe.form_dict.parent]],
|
||||||
order_by='idx')
|
order_by='idx')
|
||||||
|
Loading…
Reference in New Issue
Block a user