@@ -148,10 +148,8 @@ frappe.ui.form.Control = Class.extend({ | |||||
return this.get_input_value ? | return this.get_input_value ? | ||||
(this.parse ? this.parse(this.get_input_value()) : this.get_input_value()) : | (this.parse ? this.parse(this.get_input_value()) : this.get_input_value()) : | ||||
undefined; | undefined; | ||||
} else if(this.get_status()==='Read') { | |||||
return this.value || undefined; | |||||
} else { | } else { | ||||
return undefined; | |||||
return this.value || undefined; | |||||
} | } | ||||
}, | }, | ||||
set_model_value: function(value) { | set_model_value: function(value) { | ||||
@@ -361,7 +361,7 @@ frappe.ui.form.Grid = Class.extend({ | |||||
}, | }, | ||||
set_editable_grid_column_disp: function(fieldname, show) { | set_editable_grid_column_disp: function(fieldname, show) { | ||||
//Hide columns for editable grids | //Hide columns for editable grids | ||||
if (this.meta.editable_grid) { | |||||
if (this.meta.editable_grid && this.grid_rows) { | |||||
this.grid_rows.forEach(function(row) { | this.grid_rows.forEach(function(row) { | ||||
row.columns_list.forEach(function(column) { | row.columns_list.forEach(function(column) { | ||||
//Hide the column specified | //Hide the column specified | ||||
@@ -38,8 +38,9 @@ frappe.ui.form.QuickEntryForm = Class.extend({ | |||||
}, | }, | ||||
set_meta_and_mandatory_fields: function(){ | set_meta_and_mandatory_fields: function(){ | ||||
// prepare a list of mandatory and bold fields | |||||
this.mandatory = $.map(frappe.get_meta(this.doctype).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); | this.meta = frappe.get_meta(this.doctype); | ||||
if (!this.doc) { | if (!this.doc) { | ||||
this.doc = frappe.model.get_new_doc(this.doctype, null, null, true); | 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.onhide = () => frappe.quick_entry = null; | ||||
this.dialog.show(); | this.dialog.show(); | ||||
this.dialog.refresh_dependency(); | |||||
this.set_defaults(); | this.set_defaults(); | ||||
if (this.init_callback) { | if (this.init_callback) { | ||||