From ecee1825e53318a3948e19b26fd4963a95b51bbe Mon Sep 17 00:00:00 2001 From: Makarand Bauskar Date: Fri, 15 Dec 2017 16:39:28 +0530 Subject: [PATCH] [minor] mapped the __newname field value while editing doc in quick entry (#4615) --- frappe/public/js/frappe/form/quick_entry.js | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/frappe/public/js/frappe/form/quick_entry.js b/frappe/public/js/frappe/form/quick_entry.js index 824d25458c..69cf6c517f 100644 --- a/frappe/public/js/frappe/form/quick_entry.js +++ b/frappe/public/js/frappe/form/quick_entry.js @@ -81,7 +81,7 @@ frappe.ui.form.QuickEntryForm = Class.extend({ validate_for_prompt_autoname: function(){ if(this.meta.autoname && this.meta.autoname.toLowerCase()==='prompt') { - this.mandatory = [{fieldname:'__name', label:__('{0} Name', [this.meta.name]), + this.mandatory = [{fieldname:'__newname', label:__('{0} Name', [this.meta.name]), reqd: 1, fieldtype:'Data'}].concat(this.mandatory); } }, @@ -183,12 +183,8 @@ frappe.ui.form.QuickEntryForm = Class.extend({ var me = this; var data = this.dialog.get_values(true); $.each(data, function(key, value) { - if(key==='__name') { - me.dialog.doc.name = value; - } else { - if(!is_null(value)) { - me.dialog.doc[key] = value; - } + if(!is_null(value)) { + me.dialog.doc[key] = value; } }); return this.dialog.doc;