merged with master

This commit is contained in:
Nabin Hait
2012-12-14 10:43:56 +05:30
67 changed files with 447 additions and 401 deletions

View File

@@ -71,9 +71,9 @@ cur_frm.cscript['Make Maintenance Visit'] = function() {
$c_obj(make_doclist(doc.doctype, doc.name),'check_maintenance_visit','',
function(r,rt){
if(r.message == 'No'){
n = createLocal("Maintenance Visit");
n = wn.model.make_new_doc_and_get_name("Maintenance Visit");
$c('dt_map', args={
'docs':compress_doclist([locals["Maintenance Visit"][n]]),
'docs':wn.model.compress([locals["Maintenance Visit"][n]]),
'from_doctype':'Customer Issue',
'to_doctype':'Maintenance Visit',
'from_docname':doc.name,

View File

@@ -116,7 +116,7 @@ cur_frm.cscript.periodicity = function(doc, cdt, cdn){
cur_frm.cscript.generate_schedule = function(doc, cdt, cdn) {
if (!doc.__islocal) {
$c('runserverobj', args={'method':'generate_schedule', 'docs':compress_doclist(make_doclist(cdt,cdn))},
$c('runserverobj', args={'method':'generate_schedule', 'docs':wn.model.compress(make_doclist(cdt,cdn))},
function(r,rt){
refresh_field('maintenance_schedule_detail');
}

View File

@@ -135,7 +135,7 @@ class SupportMailbox(POP3Mailbox):
from webnotes.utils.file_manager import save_file, add_file_list
for attachment in attachment_list:
fid = save_file(attachment['filename'], attachment['content'], 'Support')
status = add_file_list('Support Ticket', doc.name, attachment['filename'], fid)
status = add_file_list('Support Ticket', doc.name, fid, fid)
if not status:
doc.description = doc.description \
+ "\nCould not attach: " + cstr(attachment['filename'])

View File

@@ -18,7 +18,6 @@ cur_frm.fields_dict.customer.get_query = erpnext.utils.customer_query;
$.extend(cur_frm.cscript, {
onload: function(doc, dt, dn) {
cur_frm.last_reload = new Date();
if(in_list(user_roles,'System Manager')) {
cur_frm.page_layout.footer.help_area.innerHTML = '<hr>\
<p><a href="#Form/Email Settings/Email Settings">Email Settings</a><br>\
@@ -27,11 +26,6 @@ $.extend(cur_frm.cscript, {
},
refresh: function(doc) {
if(new Date() - cur_frm.last_reload > 20000) {
cur_frm.last_reload = new Date();
cur_frm.reload_doc();
return;
}
erpnext.hide_naming_series();
cur_frm.cscript.make_listing(doc);
if(!doc.__islocal) {