diff --git a/frappe/public/js/frappe/form/controls/base_control.js b/frappe/public/js/frappe/form/controls/base_control.js index 68a1138584..21028e1e25 100644 --- a/frappe/public/js/frappe/form/controls/base_control.js +++ b/frappe/public/js/frappe/form/controls/base_control.js @@ -148,10 +148,8 @@ frappe.ui.form.Control = Class.extend({ return this.get_input_value ? (this.parse ? this.parse(this.get_input_value()) : this.get_input_value()) : undefined; - } else if(this.get_status()==='Read') { - return this.value || undefined; } else { - return undefined; + return this.value || undefined; } }, set_model_value: function(value) { diff --git a/frappe/public/js/frappe/form/grid.js b/frappe/public/js/frappe/form/grid.js index c249883465..0c8e9822e9 100644 --- a/frappe/public/js/frappe/form/grid.js +++ b/frappe/public/js/frappe/form/grid.js @@ -361,7 +361,7 @@ frappe.ui.form.Grid = Class.extend({ }, set_editable_grid_column_disp: function(fieldname, show) { //Hide columns for editable grids - if (this.meta.editable_grid) { + if (this.meta.editable_grid && this.grid_rows) { this.grid_rows.forEach(function(row) { row.columns_list.forEach(function(column) { //Hide the column specified diff --git a/frappe/public/js/frappe/form/quick_entry.js b/frappe/public/js/frappe/form/quick_entry.js index 031982392d..c63730599c 100644 --- a/frappe/public/js/frappe/form/quick_entry.js +++ b/frappe/public/js/frappe/form/quick_entry.js @@ -38,8 +38,9 @@ frappe.ui.form.QuickEntryForm = Class.extend({ }, set_meta_and_mandatory_fields: function(){ + // prepare a list of mandatory and bold fields this.mandatory = $.map(frappe.get_meta(this.doctype).fields, - function(d) { return (d.reqd || d.bold && !d.read_only) ? d : null; }); + function(d) { return (d.reqd || d.bold && !d.read_only) ? $.extend({}, d) : null; }); this.meta = frappe.get_meta(this.doctype); if (!this.doc) { this.doc = frappe.model.get_new_doc(this.doctype, null, null, true); @@ -108,6 +109,7 @@ frappe.ui.form.QuickEntryForm = Class.extend({ this.dialog.onhide = () => frappe.quick_entry = null; this.dialog.show(); + this.dialog.refresh_dependency(); this.set_defaults(); if (this.init_callback) {