Merge branch 'master' of github.com:webnotes/erpnext into unicode
diff --git a/erpnext/accounts/doctype/gl_control/gl_control.py b/erpnext/accounts/doctype/gl_control/gl_control.py
index 2acb5ef..bd10d6c 100644
--- a/erpnext/accounts/doctype/gl_control/gl_control.py
+++ b/erpnext/accounts/doctype/gl_control/gl_control.py
@@ -622,7 +622,7 @@
 					<td width = "50%%">Invoice Date	   : %s<br>Invoice Period : %s to %s <br>Due Date	   : %s</td>
 				</tr>
 			</table>
-		''' % (com, new_rv.doc.name, new_rv.doc.customer, new_rv.doc.address_display, getdate(new_rv.doc.posting_date).strftime("%d-%m-%Y"), \
+		''' % (com, new_rv.doc.name, new_rv.doc.customer_name, new_rv.doc.address_display, getdate(new_rv.doc.posting_date).strftime("%d-%m-%Y"), \
 		getdate(new_rv.doc.invoice_period_from_date).strftime("%d-%m-%Y"), getdate(new_rv.doc.invoice_period_to_date).strftime("%d-%m-%Y"),\
 		getdate(new_rv.doc.due_date).strftime("%d-%m-%Y"))
 	
diff --git a/erpnext/support/doctype/communication/communication.js b/erpnext/support/doctype/communication/communication.js
index d6af592..59e2ee9 100644
--- a/erpnext/support/doctype/communication/communication.js
+++ b/erpnext/support/doctype/communication/communication.js
@@ -64,7 +64,7 @@
 		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 @@
 		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],
 			],
 		});