[fix] Customer Issue no longer submittable, does not make sense
diff --git a/support/doctype/customer_issue/customer_issue.js b/support/doctype/customer_issue/customer_issue.js
index 558ef32..9957c8e 100644
--- a/support/doctype/customer_issue/customer_issue.js
+++ b/support/doctype/customer_issue/customer_issue.js
@@ -18,10 +18,9 @@
// TODO commonify this code
erpnext.support.CustomerIssue = wn.ui.form.Controller.extend({
refresh: function() {
- if(cur_frm.doc.docstatus==1 && (cur_frm.doc.status=='Open' ||
- cur_frm.doc.status == 'Work In Progress')) {
- cur_frm.add_custom_button('Make Maintenance Visit', this.make_maintenance_visit)
- }
+ if((cur_frm.doc.status=='Open' || cur_frm.doc.status == 'Work In Progress')) {
+ cur_frm.add_custom_button('Make Maintenance Visit', this.make_maintenance_visit)
+ }
},
customer: function() {
diff --git a/support/doctype/customer_issue/customer_issue.txt b/support/doctype/customer_issue/customer_issue.txt
index 1850f57..5f89ade 100644
--- a/support/doctype/customer_issue/customer_issue.txt
+++ b/support/doctype/customer_issue/customer_issue.txt
@@ -2,7 +2,7 @@
{
"creation": "2013-01-10 16:34:30",
"docstatus": 0,
- "modified": "2013-07-05 14:34:37",
+ "modified": "2013-07-10 13:13:27",
"modified_by": "Administrator",
"owner": "harshada@webnotestech.com"
},
@@ -10,7 +10,7 @@
"autoname": "naming_series:",
"doctype": "DocType",
"icon": "icon-bug",
- "is_submittable": 1,
+ "is_submittable": 0,
"module": "Support",
"name": "__common__",
"search_fields": "status,customer,customer_name,allocated_to,allocated_on, territory"
@@ -24,6 +24,8 @@
"permlevel": 0
},
{
+ "amend": 0,
+ "cancel": 1,
"create": 1,
"doctype": "DocPerm",
"name": "__common__",
@@ -33,6 +35,8 @@
"permlevel": 0,
"read": 1,
"report": 1,
+ "role": "Maintenance User",
+ "submit": 0,
"write": 1
},
{
@@ -412,28 +416,6 @@
"width": "150px"
},
{
- "amend": 1,
- "cancel": 1,
- "doctype": "DocPerm",
- "role": "System Manager",
- "submit": 1
- },
- {
- "amend": 1,
- "cancel": 1,
- "doctype": "DocPerm",
- "role": "Maintenance Manager",
- "submit": 1
- },
- {
- "amend": 1,
- "cancel": 1,
- "doctype": "DocPerm",
- "role": "Maintenance User",
- "submit": 1
- },
- {
- "doctype": "DocPerm",
- "role": "Guest"
+ "doctype": "DocPerm"
}
]
\ No newline at end of file
diff --git a/support/doctype/maintenance_visit/maintenance_visit.js b/support/doctype/maintenance_visit/maintenance_visit.js
index 50cc797..8de80af 100644
--- a/support/doctype/maintenance_visit/maintenance_visit.js
+++ b/support/doctype/maintenance_visit/maintenance_visit.js
@@ -37,7 +37,6 @@
method: "support.doctype.customer_issue.customer_issue.make_maintenance_visit",
source_doctype: "Customer Issue",
get_query_filters: {
- docstatus: 1,
status: ["in", "Open, Work in Progress"],
customer: cur_frm.doc.customer || undefined,
company: cur_frm.doc.company