From 790a91271ef24c885136018573729c6896dd68a6 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 10 Jul 2013 13:18:02 +0530 Subject: [PATCH] [fix] Customer Issue no longer submittable, does not make sense --- .../doctype/customer_issue/customer_issue.js | 7 ++-- .../doctype/customer_issue/customer_issue.txt | 32 ++++--------------- .../maintenance_visit/maintenance_visit.js | 1 - 3 files changed, 10 insertions(+), 30 deletions(-) diff --git a/support/doctype/customer_issue/customer_issue.js b/support/doctype/customer_issue/customer_issue.js index 558ef321b4..9957c8e5b9 100644 --- a/support/doctype/customer_issue/customer_issue.js +++ b/support/doctype/customer_issue/customer_issue.js @@ -18,10 +18,9 @@ wn.provide("erpnext.support"); // 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 1850f57189..5f89ade9ab 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 50cc797355..8de80afca3 100644 --- a/support/doctype/maintenance_visit/maintenance_visit.js +++ b/support/doctype/maintenance_visit/maintenance_visit.js @@ -37,7 +37,6 @@ erpnext.support.MaintenanceVisit = wn.ui.form.Controller.extend({ 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