mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-11 21:51:48 +00:00
fix(plant_floor): add missing perm check on get_stock_summary (#57667)
This commit is contained in:
@@ -69,6 +69,14 @@ class PlantFloor(Document):
|
||||
def get_stock_summary(
|
||||
warehouse: str, start: int = 0, item_code: str | None = None, item_group: str | None = None
|
||||
):
|
||||
frappe.has_permission("Warehouse", doc=warehouse, throw=True)
|
||||
|
||||
if item_code:
|
||||
frappe.has_permission("Item", doc=item_code, throw=True)
|
||||
|
||||
if item_group:
|
||||
frappe.has_permission("Item Group", doc=item_group, throw=True)
|
||||
|
||||
stock_details = get_stock_details(warehouse, start=start, item_code=item_code, item_group=item_group)
|
||||
|
||||
max_count = 0.0
|
||||
|
||||
Reference in New Issue
Block a user