* [user-progress] first cut * [user-progress] Add users slide, remove taxes, make sample data * wip tests * [setup-wiz] UI test * [user-progress] notif test, docs trim * wip * [user-progress] Setup Progress single to update action states, fixtures * setup progress actions patch * rename sales_target field patch * [progress] wip reform slide data * [progress] remove slide data * [setup] add roles for GST doctypes, remove commit from fixtures
38 lines
1.7 KiB
Python
38 lines
1.7 KiB
Python
|
|
from __future__ import unicode_literals
|
|
import frappe
|
|
from frappe import _
|
|
|
|
def execute():
|
|
"""Add setup progress actions"""
|
|
frappe.reload_doc("setup", "doctype", "setup_progress")
|
|
frappe.reload_doc("setup", "doctype", "setup_progress_action")
|
|
|
|
actions = [
|
|
{"action_name": _("Add Company"), "action_doctype": "Company", "min_doc_count": 1, "is_completed": 1,
|
|
"domains": '[]' },
|
|
{"action_name": _("Add Customers"), "action_doctype": "Customer", "min_doc_count": 1, "is_completed": 0,
|
|
"domains": '["Manufacturing", "Services", "Retail", "Distribution"]' },
|
|
{"action_name": _("Add Suppliers"), "action_doctype": "Supplier", "min_doc_count": 1, "is_completed": 0,
|
|
"domains": '["Manufacturing", "Services", "Retail", "Distribution"]' },
|
|
{"action_name": _("Add Products"), "action_doctype": "Item", "min_doc_count": 1, "is_completed": 0,
|
|
"domains": '["Manufacturing", "Services", "Retail", "Distribution"]' },
|
|
{"action_name": _("Add Programs"), "action_doctype": "Program", "min_doc_count": 1, "is_completed": 0,
|
|
"domains": '["Education"]' },
|
|
{"action_name": _("Add Instructors"), "action_doctype": "Instructor", "min_doc_count": 1, "is_completed": 0,
|
|
"domains": '["Education"]' },
|
|
{"action_name": _("Add Courses"), "action_doctype": "Course", "min_doc_count": 1, "is_completed": 0,
|
|
"domains": '["Education"]' },
|
|
{"action_name": _("Add Rooms"), "action_doctype": "Room", "min_doc_count": 1, "is_completed": 0,
|
|
"domains": '["Education"]' },
|
|
{"action_name": _("Add Users"), "action_doctype": "User", "min_doc_count": 4, "is_completed": 0,
|
|
"domains": '[]' }
|
|
]
|
|
|
|
setup_progress = frappe.get_doc("Setup Progress", "Setup Progress")
|
|
for action in actions:
|
|
setup_progress.append("actions", action)
|
|
|
|
setup_progress.save(ignore_permissions=True)
|
|
|