Merge pull request #36313 from barredterra/delete-root-item-group

fix(Item Group): allow root deletion
diff --git a/erpnext/setup/doctype/item_group/item_group.py b/erpnext/setup/doctype/item_group/item_group.py
index e96c854..cc67c69 100644
--- a/erpnext/setup/doctype/item_group/item_group.py
+++ b/erpnext/setup/doctype/item_group/item_group.py
@@ -73,7 +73,7 @@
 			return self.route
 
 	def on_trash(self):
-		NestedSet.on_trash(self)
+		NestedSet.on_trash(self, allow_root_deletion=True)
 		WebsiteGenerator.on_trash(self)
 		self.delete_child_item_groups_key()