Merge pull request #440 from pateljannat/rename-skill

This commit is contained in:
Jannat Patel
2022-12-01 15:03:01 +05:30
committed by GitHub
8 changed files with 18 additions and 8 deletions

View File

@@ -15,14 +15,14 @@
"fieldtype": "Link",
"in_list_view": 1,
"label": "Skill Name",
"options": "Skill",
"options": "User Skill",
"reqd": 1
}
],
"index_web_pages_for_search": 1,
"istable": 1,
"links": [],
"modified": "2021-12-21 09:59:31.631132",
"modified": "2022-12-01 11:28:53.518929",
"modified_by": "Administrator",
"module": "LMS",
"name": "Skills",
@@ -30,5 +30,6 @@
"owner": "Administrator",
"permissions": [],
"sort_field": "modified",
"sort_order": "DESC"
}
"sort_order": "DESC",
"states": []
}

View File

@@ -5,5 +5,5 @@
import unittest
class TestSkill(unittest.TestCase):
class TestUserSkill(unittest.TestCase):
pass

View File

@@ -1,7 +1,7 @@
// Copyright (c) 2021, Frappe and contributors
// For license information, please see license.txt
frappe.ui.form.on("Skill", {
frappe.ui.form.on("User Skill", {
// refresh: function(frm) {
// }
});

View File

@@ -22,7 +22,7 @@
"modified": "2021-12-21 09:35:44.265910",
"modified_by": "Administrator",
"module": "LMS",
"name": "Skill",
"name": "User Skill",
"naming_rule": "By fieldname",
"owner": "Administrator",
"permissions": [

View File

@@ -5,5 +5,5 @@
from frappe.model.document import Document
class Skill(Document):
class UserSkill(Document):
pass

View File

@@ -39,3 +39,4 @@ lms.patches.v0_0.convert_progress_to_float
lms.patches.v0_0.add_pages_to_nav #25-11-2022
lms.patches.v0_0.change_role_names
lms.patches.v0_0.quiz_submission_result
lms.patches.v0_0.skill_to_user_skill

View File

@@ -0,0 +1,8 @@
import frappe
def execute():
frappe.reload_doc("lms", "doctype", "user_skill")
skills = frappe.get_all("Skill", pluck="name")
for skill in skills:
frappe.get_doc({"doctype": "User Skill", "skill": skill}).save()