Image field and view added to all selling doctypes
diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js
index c8b028b..cea4d03 100644
--- a/erpnext/public/js/controllers/transaction.js
+++ b/erpnext/public/js/controllers/transaction.js
@@ -68,6 +68,7 @@
 
 	item_code: function(doc, cdt, cdn) {
 		var me = this;
+		var d = locals[cdt][cdn];
 		var item = frappe.get_doc(cdt, cdn);
 		if(item.item_code || item.barcode || item.serial_no) {
 			if(!this.validate_company_and_party()) {