From 3b0cbc972eae6b1c062b42c03406406b3de687cd Mon Sep 17 00:00:00 2001 From: diptanilsaha Date: Wed, 15 Jul 2026 23:23:48 +0530 Subject: [PATCH] fix(item_variant): added permission checks on `enqueue_multiple_variant_creation` --- erpnext/controllers/item_variant.py | 1 + 1 file changed, 1 insertion(+) diff --git a/erpnext/controllers/item_variant.py b/erpnext/controllers/item_variant.py index 3e4f632307e..3c4f4cb5dfd 100644 --- a/erpnext/controllers/item_variant.py +++ b/erpnext/controllers/item_variant.py @@ -346,6 +346,7 @@ def create_variant(item: str, args: dict | str, use_template_image: bool = False def enqueue_multiple_variant_creation(item: str, args: dict | str, use_template_image: bool = False): use_template_image = frappe.parse_json(use_template_image) # There can be innumerable attribute combinations, enqueue + frappe.has_permission("Item", ptype="create", throw=True) variants = frappe.parse_json(args) variants = {key: values for key, values in variants.items() if values} if not variants: