diff --git a/erpnext/support/doctype/communication/communication.js b/erpnext/support/doctype/communication/communication.js index d6af5920483..59e2ee9c55b 100644 --- a/erpnext/support/doctype/communication/communication.js +++ b/erpnext/support/doctype/communication/communication.js @@ -64,7 +64,7 @@ cur_frm.cscript.render_communication_list = function(doc, dt, dn) { ListView, function(doctype) { var new_doc = LocalDB.create(doctype); new_doc = locals[doctype][new_doc]; - new_doc[doc.doctype.toLowerCase()] = doc.name; + new_doc[doc.doctype.toLowerCase().replace(" ", "_")] = doc.name; loaddoc(new_doc.doctype, new_doc.name); }); } @@ -79,7 +79,7 @@ cur_frm.cscript.render_list = function(doc, doctype, wrapper, ListView, make_new var RecordListView = wn.views.RecordListView.extend({ default_docstatus: ['0', '1', '2'], default_filters: [ - [doctype, doc.doctype.toLowerCase(), '=', doc.name], + [doctype, doc.doctype.toLowerCase().replace(" ", "_"), '=', doc.name], ], });