fix: Qms icon color and label fix (#16293)
* qms color fix according to palette
* changed qms icon and color
* patch to change icon
* fix no module named v12_0
* removed spacing in desktop icon
* fix: line break
* renamed QM to Quality
* patch to rename quality management to quality
* resolve merge conflicts
diff --git a/erpnext/config/desktop.py b/erpnext/config/desktop.py
index 2202b9e..cc7ee02 100644
--- a/erpnext/config/desktop.py
+++ b/erpnext/config/desktop.py
@@ -575,9 +575,9 @@
},
{
"module_name": "Quality Management",
- "color": "blue",
- "icon": "octicon octicon-package",
+ "color": "#1abc9c",
+ "icon": "fa fa-check-square-o",
"type": "module",
- "label": _("Quality Management")
+ "label": _("Quality")
}
- ]
+ ]
\ No newline at end of file
diff --git a/erpnext/patches.txt b/erpnext/patches.txt
index 1da7eba..36d4c76 100755
--- a/erpnext/patches.txt
+++ b/erpnext/patches.txt
@@ -580,6 +580,7 @@
erpnext.patches.v10_0.repost_gle_for_purchase_receipts_with_rejected_items
erpnext.patches.v11_0.set_missing_gst_hsn_code
erpnext.patches.v11_0.rename_bom_wo_fields
+erpnext.patches.v12_0.change_qms_icon
erpnext.patches.v12_0.rename_learn_to_help
erpnext.patches.v12_0.rename_accounts_desktop_icon_to_accounting
erpnext.patches.v12_0.replace_project_list_desktop_icon_with_projects_module_desktop_icon
diff --git a/erpnext/patches/v12_0/change_qms_icon.py b/erpnext/patches/v12_0/change_qms_icon.py
new file mode 100644
index 0000000..2b6c09a
--- /dev/null
+++ b/erpnext/patches/v12_0/change_qms_icon.py
@@ -0,0 +1,10 @@
+import frappe
+
+def execute():
+ qms_icons = frappe.get_all("Desktop Icon", filters={
+ "module_name": "Quality Management"
+ })
+
+ for icon in qms_icons:
+ frappe.db.set_value('Desktop Icon', icon.name, 'color', '#1abc9c')
+ frappe.db.set_value('Desktop Icon', icon.name, 'icon', 'fa fa-check-square-o')
diff --git a/erpnext/patches/v12_0/rename_quality_management_to_quality.py b/erpnext/patches/v12_0/rename_quality_management_to_quality.py
new file mode 100644
index 0000000..cdcf191
--- /dev/null
+++ b/erpnext/patches/v12_0/rename_quality_management_to_quality.py
@@ -0,0 +1,10 @@
+import frappe
+from frappe import _
+
+def execute():
+ quality_management_module_icons = frappe.get_all('Desktop Icon', filters={
+ 'module_name': 'Quality Management'
+ }, fields=['name'])
+
+ for icon in quality_management_module_icons:
+ frappe.db.set_value('Desktop Icon', icon.name, 'label', _('Quality'))
\ No newline at end of file
diff --git a/erpnext/quality_management/doctype/customer_feedback/test_customer_feedback.py b/erpnext/quality_management/doctype/customer_feedback/test_customer_feedback.py
index 2ac6525..b5d6141 100644
--- a/erpnext/quality_management/doctype/customer_feedback/test_customer_feedback.py
+++ b/erpnext/quality_management/doctype/customer_feedback/test_customer_feedback.py
@@ -28,19 +28,4 @@
def get_feedback():
feedback = frappe.get_list("Customer Feedback", limit=1)
- return feedback[0]
-
-#def create_feedback_template():
-# template = frappe.get_doc({
-# "doctype": "Customer Feedback Template",
-# "template": "_Test Customer Feedback Template",
-# "scope": "Company",
-# "feedback_parameter": [
-# {
-# "parameter": "_Test Customer Feedback Template Parameter",
-# }
-# ]
-# })
-# template_exist = frappe.get_list("Customer Feedback Template", filters={"template": ""+ template.template +""}, fields=["name"])
-# if len(template_exist) == 0:
-# template.insert()
\ No newline at end of file
+ return feedback[0]
\ No newline at end of file