2017-12-04 13:58:13 +00:00
|
|
|
# Copyright (c) 2017, Frappe and Contributors
|
|
|
|
# License: GNU General Public License v3. See license.txt
|
|
|
|
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
import frappe
|
|
|
|
|
|
|
|
def execute():
|
|
|
|
domain = 'Non Profit'
|
|
|
|
if not frappe.db.exists('Domain', domain):
|
|
|
|
frappe.get_doc({
|
|
|
|
'doctype': 'Domain',
|
|
|
|
'domain': domain
|
2017-12-06 07:27:53 +00:00
|
|
|
}).insert(ignore_permissions=True)
|
|
|
|
|
|
|
|
frappe.get_doc({
|
|
|
|
'doctype': 'Role',
|
|
|
|
'role_name': 'Non Profit Portal User',
|
|
|
|
'desk_access': 0,
|
|
|
|
'restrict_to_domain': domain
|
2017-12-04 13:58:13 +00:00
|
|
|
}).insert(ignore_permissions=True)
|