refactor: rename onboarding to module onboarding
This commit is contained in:
parent
4ff23172cd
commit
48382fdca0
10 changed files with 15 additions and 15 deletions
|
|
@ -61,10 +61,10 @@ class Workspace:
|
|||
if not self.doc.onboarding:
|
||||
return None
|
||||
|
||||
if frappe.db.get_value("Onboarding", self.doc.onboarding, "is_complete"):
|
||||
if frappe.db.get_value("Module Onboarding", self.doc.onboarding, "is_complete"):
|
||||
return None
|
||||
|
||||
doc = frappe.get_doc("Onboarding", self.doc.onboarding)
|
||||
doc = frappe.get_doc("Module Onboarding", self.doc.onboarding)
|
||||
|
||||
# Check if user is allowed
|
||||
allowed_roles = set(doc.get_allowed_roles())
|
||||
|
|
|
|||
|
|
@ -188,11 +188,11 @@
|
|||
"fieldname": "onboarding",
|
||||
"fieldtype": "Link",
|
||||
"label": "Onboarding",
|
||||
"options": "Onboarding"
|
||||
"options": "Module Onboarding"
|
||||
}
|
||||
],
|
||||
"links": [],
|
||||
"modified": "2020-04-26 12:21:46.205079",
|
||||
"modified": "2020-05-12 16:12:20.708394",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Desk",
|
||||
"name": "Desk Page",
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) 2020, Frappe Technologies and contributors
|
||||
// For license information, please see license.txt
|
||||
|
||||
frappe.ui.form.on("Onboarding", {
|
||||
frappe.ui.form.on("Module ModuleOnboarding", {
|
||||
refresh: function(frm) {
|
||||
frappe.boot.developer_mode &&
|
||||
frm.set_intro(
|
||||
|
|
@ -93,7 +93,7 @@
|
|||
"modified": "2020-05-01 19:37:21.492405",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Desk",
|
||||
"name": "Onboarding",
|
||||
"name": "Module Onboarding",
|
||||
"owner": "Administrator",
|
||||
"permissions": [
|
||||
{
|
||||
|
|
@ -8,16 +8,16 @@ from frappe.model.document import Document
|
|||
from frappe.modules.export_file import export_to_files
|
||||
|
||||
|
||||
class Onboarding(Document):
|
||||
class ModuleOnboarding(Document):
|
||||
def on_update(self):
|
||||
if frappe.conf.developer_mode:
|
||||
export_to_files(record_list=[['Onboarding', self.name]], record_module=self.module)
|
||||
export_to_files(record_list=[['Module ModuleOnboarding', self.name]], record_module=self.module)
|
||||
|
||||
for step in self.steps:
|
||||
export_to_files(record_list=[['Onboarding Step', step.step]], record_module=self.module)
|
||||
export_to_files(record_list=[['Module ModuleOnboarding Step', step.step]], record_module=self.module)
|
||||
|
||||
def get_steps(self):
|
||||
return [frappe.get_doc("Onboarding Step", step.step) for step in self.steps]
|
||||
return [frappe.get_doc("Module ModuleOnboarding Step", step.step) for step in self.steps]
|
||||
|
||||
def get_allowed_roles(self):
|
||||
all_roles = [role.role for role in self.allow_roles]
|
||||
|
|
@ -6,5 +6,5 @@ from __future__ import unicode_literals
|
|||
# import frappe
|
||||
import unittest
|
||||
|
||||
class TestOnboarding(unittest.TestCase):
|
||||
class TestModuleOnboarding(unittest.TestCase):
|
||||
pass
|
||||
|
|
@ -51,7 +51,7 @@ def sync_for(app_name, force=0, sync_everything = False, verbose=False, reset_pe
|
|||
("desk", "onboarding_permission"),
|
||||
("desk", "onboarding_step"),
|
||||
("desk", "onboarding_step_map"),
|
||||
("desk", "onboarding"),
|
||||
("desk", "module_onboarding"),
|
||||
("desk", "desk_card"),
|
||||
("desk", "desk_chart"),
|
||||
("desk", "desk_shortcut"),
|
||||
|
|
@ -85,7 +85,7 @@ def get_doc_files(files, start_path, force=0, sync_everything = False, verbose=F
|
|||
document_types = ['doctype', 'page', 'report', 'dashboard_chart_source', 'print_format',
|
||||
'website_theme', 'web_form', 'web_template', 'notification', 'print_style',
|
||||
'data_migration_mapping', 'data_migration_plan', 'desk_page',
|
||||
'onboarding_step', 'onboarding']
|
||||
'onboarding_step', 'module_onboarding']
|
||||
|
||||
for doctype in document_types:
|
||||
doctype_path = os.path.join(start_path, doctype)
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ ignore_values = {
|
|||
"Print Format": ["disabled"],
|
||||
"Notification": ["enabled"],
|
||||
"Print Style": ["disabled"],
|
||||
"Onboarding": ['is_complete'],
|
||||
"Module Onboarding": ['is_complete'],
|
||||
"Onboarding Step": ['is_complete', 'is_skipped']
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
],
|
||||
"creation": "2020-04-26 13:03:30.405135",
|
||||
"docstatus": 0,
|
||||
"doctype": "Onboarding",
|
||||
"doctype": "Module Onboarding",
|
||||
"documentation_url": "https://docs.erpnext.com/docs/user/manual/en/website",
|
||||
"idx": 0,
|
||||
"is_complete": 0,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue