From 101bb2bf5a41404ef07168be31d8dbeaf24c5194 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 11 Jun 2013 16:41:42 +0530 Subject: [PATCH 1/2] [support ticket] enable close and re-open ticket buttons if status field is editable --- support/doctype/support_ticket/support_ticket.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/support/doctype/support_ticket/support_ticket.js b/support/doctype/support_ticket/support_ticket.js index 4226b47b47..4ea179dc87 100644 --- a/support/doctype/support_ticket/support_ticket.js +++ b/support/doctype/support_ticket/support_ticket.js @@ -27,8 +27,8 @@ $.extend(cur_frm.cscript, { refresh: function(doc) { erpnext.hide_naming_series(); cur_frm.cscript.make_listing(doc); - if(!doc.__islocal) { - if(user_roles.indexOf("Support Manager")!==-1) { + if(!doc.__islocal) { + if(cur_frm.fields_dict.status.get_status()=="Write") { if(doc.status!='Closed') cur_frm.add_custom_button('Close Ticket', cur_frm.cscript['Close Ticket']); if(doc.status=='Closed') cur_frm.add_custom_button('Re-Open Ticket', cur_frm.cscript['Re-Open Ticket']); } From 3b867f73776b9342944e81284d3d19ee81028abb Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 11 Jun 2013 17:21:11 +0530 Subject: [PATCH 2/2] [cleanup] [fix] removed amendment_date --- selling/doctype/installation_note/installation_note.py | 1 - selling/doctype/quotation/quotation.py | 1 - stock/doctype/delivery_note/delivery_note.py | 1 - 3 files changed, 3 deletions(-) diff --git a/selling/doctype/installation_note/installation_note.py b/selling/doctype/installation_note/installation_note.py index ed49aefdf9..63e1bae3fa 100644 --- a/selling/doctype/installation_note/installation_note.py +++ b/selling/doctype/installation_note/installation_note.py @@ -52,7 +52,6 @@ class DocType(TransactionBase): sales_com_obj = get_obj(dt = 'Sales Common') sales_com_obj.check_active_sales_items(self) sales_com_obj.get_prevdoc_date(self) - self.validate_mandatory() self.validate_reference_value() def pull_delivery_note_details(self): diff --git a/selling/doctype/quotation/quotation.py b/selling/doctype/quotation/quotation.py index efc5412af8..c474d998c2 100644 --- a/selling/doctype/quotation/quotation.py +++ b/selling/doctype/quotation/quotation.py @@ -158,7 +158,6 @@ class DocType(SellingController): "Order Confirmed", "Order Lost", "Cancelled"]) self.validate_fiscal_year() - self.validate_mandatory() self.set_last_contact_date() self.validate_order_type() self.validate_for_items() diff --git a/stock/doctype/delivery_note/delivery_note.py b/stock/doctype/delivery_note/delivery_note.py index d9b1bd2401..fd74976ce6 100644 --- a/stock/doctype/delivery_note/delivery_note.py +++ b/stock/doctype/delivery_note/delivery_note.py @@ -124,7 +124,6 @@ class DocType(SellingController): sales_com_obj.check_stop_sales_order(self) sales_com_obj.check_active_sales_items(self) sales_com_obj.get_prevdoc_date(self) - self.validate_mandatory() self.validate_reference_value() self.validate_for_items() self.validate_warehouse()