Merge branch 'pratu16x7-domainify' into domainify (#9324)

* bootstrap domains and set active_domain on setup

* [minor] Patch for domain docs

* [minor]

* Update create_domain_docs.py
diff --git a/erpnext/setup/setup_wizard/domainify.py b/erpnext/setup/setup_wizard/domainify.py
index 0069e88..f0aaf02 100644
--- a/erpnext/setup/setup_wizard/domainify.py
+++ b/erpnext/setup/setup_wizard/domainify.py
@@ -105,8 +105,9 @@
 
 	if data.allow_roles:
 		# remove all roles other than allowed roles
+		active_domains = frappe.get_active_domains()
 		data.allow_roles += ['Administrator', 'Guest', 'System Manager', 'All']
-		for role in frappe.get_all('Role'):
+		for role in frappe.get_all('Role', filters = {"restrict_to_domain": ("not in", active_domains)}):
 			if not (role.name in data.allow_roles):
 				remove_role(role.name)