From faf126eea710a54dd4436edd299eeb9935a4fc92 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Fri, 30 Oct 2020 15:39:44 +0530 Subject: [PATCH] refactor(onboarding): update step doctype * remove mandatory (All steps are optional) * add action label * Allow form tour in create entry --- .../onboarding_step/onboarding_step.json | 24 ++++++++++++------- .../onboarding_step/onboarding_step.py | 4 ---- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/frappe/desk/doctype/onboarding_step/onboarding_step.json b/frappe/desk/doctype/onboarding_step/onboarding_step.json index cabe49167e..f71e821f65 100644 --- a/frappe/desk/doctype/onboarding_step/onboarding_step.json +++ b/frappe/desk/doctype/onboarding_step/onboarding_step.json @@ -8,7 +8,6 @@ "field_order": [ "title", "column_break_2", - "is_mandatory", "is_complete", "is_skipped", "description_section", @@ -16,9 +15,11 @@ "intro_video_url", "section_break_5", "action", + "action_label", "column_break_7", "reference_document", "show_full_form", + "show_form_tour", "is_single", "reference_report", "report_reference_doctype", @@ -33,13 +34,6 @@ "video_url" ], "fields": [ - { - "default": "0", - "fieldname": "is_mandatory", - "fieldtype": "Check", - "in_list_view": 1, - "label": "Is Mandatory" - }, { "default": "0", "fieldname": "is_complete", @@ -200,10 +194,22 @@ "fieldname": "intro_video_url", "fieldtype": "Data", "label": "Intro Video URL" + }, + { + "fieldname": "action_label", + "fieldtype": "Data", + "label": "Action Label" + }, + { + "default": "0", + "depends_on": "eval:doc.action==\"Create Entry\" && doc.show_full_form", + "fieldname": "show_form_tour", + "fieldtype": "Check", + "label": "Show Form Tour" } ], "links": [], - "modified": "2020-10-14 15:55:27.578883", + "modified": "2020-10-30 14:54:06.646513", "modified_by": "Administrator", "module": "Desk", "name": "Onboarding Step", diff --git a/frappe/desk/doctype/onboarding_step/onboarding_step.py b/frappe/desk/doctype/onboarding_step/onboarding_step.py index 8086acbb2a..e1cc5dfba4 100644 --- a/frappe/desk/doctype/onboarding_step/onboarding_step.py +++ b/frappe/desk/doctype/onboarding_step/onboarding_step.py @@ -10,7 +10,3 @@ class OnboardingStep(Document): def before_export(self, doc): doc.is_complete = 0 doc.is_skipped = 0 - - def validate(self): - if self.action == "Go to Page": - self.is_mandatory = 0