Merge branch 'master' of github.com:webnotes/erpnext

This commit is contained in:
Rushabh Mehta 2011-07-13 17:14:54 +05:30
commit 28ca9abcc7
2 changed files with 9 additions and 5 deletions

View File

@ -1,7 +1,7 @@
# REMEMBER to update this # REMEMBER to update this
# ======================== # ========================
last_patch = 323 last_patch = 324
#------------------------------------------- #-------------------------------------------
@ -1289,3 +1289,5 @@ def execute(patch_no):
reload_doc('stock', 'doctype', 'stock_entry') reload_doc('stock', 'doctype', 'stock_entry')
sql("update `tabDocField` set options = 'get_stock_and_rate' where parent = 'Stock Entry' and label = 'Get Stock and Rate'") sql("update `tabDocField` set options = 'get_stock_and_rate' where parent = 'Stock Entry' and label = 'Get Stock and Rate'")
sql("delete from `tabDocField` where label = 'Get Current Stock' and parent = 'Stock Entry'") sql("delete from `tabDocField` where label = 'Get Current Stock' and parent = 'Stock Entry'")
elif patch_no == 324:
sql("delete from `tabDocField` where fieldname = 'test_field' and parent = 'Customer'")

View File

@ -33,12 +33,14 @@ $.extend(cur_frm.cscript, {
refresh: function(doc) { refresh: function(doc) {
cs.make_listing(doc); cs.make_listing(doc);
if(!doc.__islocal) { if(!doc.__islocal) {
if(in_list(user_roles,'System Manager')) {
if(doc.allocated_to) if(doc.status!='Closed') cur_frm.add_custom_button('Close Ticket', cs['Close Ticket']);
if(doc.status=='Closed') cur_frm.add_custom_button('Re-Open Ticket', cs['Re-Open Ticket']);
}else if(doc.allocated_to) {
set_field_permlevel('status',2); set_field_permlevel('status',2);
if(user==doc.allocated_to && doc.status!='Closed') cur_frm.add_custom_button('Close Ticket', cs['Close Ticket']); if(user==doc.allocated_to && doc.status!='Closed') cur_frm.add_custom_button('Close Ticket', cs['Close Ticket']);
if(doc.status=='Closed') cur_frm.add_custom_button('Re-Open Ticket', cs['Re-Open Ticket']); }
// can't change the main message & subject once set // can't change the main message & subject once set
set_field_permlevel('subject',2); set_field_permlevel('subject',2);