浏览代码

[minor] fix grid, dependency in quick_entry

version-14
Rushabh Mehta 7 年前
父节点
当前提交
af8bbd8018
共有 3 个文件被更改,包括 5 次插入5 次删除
  1. +1
    -3
      frappe/public/js/frappe/form/controls/base_control.js
  2. +1
    -1
      frappe/public/js/frappe/form/grid.js
  3. +3
    -1
      frappe/public/js/frappe/form/quick_entry.js

+ 1
- 3
frappe/public/js/frappe/form/controls/base_control.js 查看文件

@@ -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) {


+ 1
- 1
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) { 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


+ 3
- 1
frappe/public/js/frappe/form/quick_entry.js 查看文件

@@ -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) {


正在加载...
取消
保存