mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-13 18:21:22 +00:00
fixed conflict while merging with webnotes repo
This commit is contained in:
@@ -54,7 +54,8 @@ class SupportMailbox(POP3Mailbox):
|
||||
d.save(1)
|
||||
|
||||
# update feed
|
||||
update_feed(d)
|
||||
update_feed(d)
|
||||
|
||||
|
||||
def get_support_mails():
|
||||
"""
|
||||
|
||||
@@ -33,8 +33,14 @@ $.extend(cur_frm.cscript, {
|
||||
|
||||
refresh: function(doc) {
|
||||
cs.make_listing(doc);
|
||||
if(!doc.__islocal) {
|
||||
// can't change the main message & subject once set
|
||||
if(!doc.__islocal) {
|
||||
|
||||
if(doc.allocated_to)
|
||||
set_field_permlevel('status',2);
|
||||
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
|
||||
set_field_permlevel('subject',2);
|
||||
set_field_permlevel('description',2);
|
||||
set_field_permlevel('raised_by',2);
|
||||
@@ -87,10 +93,37 @@ $.extend(cur_frm.cscript, {
|
||||
}
|
||||
if(doc.customer) $c_obj(make_doclist(doc.doctype, doc.name), 'get_default_customer_address', '', callback);
|
||||
if(doc.customer) unhide_field(['customer_name','address_display','contact_display','contact_mobile','contact_email']);
|
||||
},
|
||||
|
||||
'Close Ticket': function() {
|
||||
var doc = cur_frm.doc
|
||||
|
||||
var answer = confirm("Close Ticket "+doc.name+"?\n\nAllocated To: "+doc.allocated_to+"\n\nSubject: "+doc.subject+"");
|
||||
if(answer) {
|
||||
if(doc.name)
|
||||
$c_obj([doc],'close_ticket','',function(r,rt) {
|
||||
cur_frm.refresh();
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
'Re-Open Ticket': function() {
|
||||
var doc = cur_frm.doc
|
||||
|
||||
var answer = confirm("Re-Open Ticket "+doc.name+"?\n\nAllocated To: "+doc.allocated_to+"\n\nSubject: "+doc.subject+"");
|
||||
if(answer) {
|
||||
if(doc.name)
|
||||
$c_obj([doc],'reopen_ticket','',function(r,rt) {
|
||||
cur_frm.refresh();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
EmailMessage = function(parent, args, list, idx) {
|
||||
var me = this;
|
||||
$.extend(this, args);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import webnotes
|
||||
|
||||
from utilities.transaction_base import TransactionBase
|
||||
from home import update_feed
|
||||
|
||||
class DocType(TransactionBase):
|
||||
def __init__(self, doc, doclist=[]):
|
||||
@@ -46,3 +47,11 @@ class DocType(TransactionBase):
|
||||
d.mail = response
|
||||
d.content_type = content_type
|
||||
d.save(1)
|
||||
|
||||
def close_ticket(self):
|
||||
webnotes.conn.set(self.doc,'status','Closed')
|
||||
update_feed(self.doc)
|
||||
|
||||
def reopen_ticket(self):
|
||||
webnotes.conn.set(self.doc,'status','Open')
|
||||
update_feed(self.doc)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user