fix(dialog): add a flag to include default value
This commit is contained in:
parent
e33097fd35
commit
a8ca40b444
2 changed files with 5 additions and 1 deletions
|
|
@ -142,7 +142,10 @@ frappe.ui.FieldGroup = class FieldGroup extends frappe.ui.form.Layout {
|
|||
for (let key in this.fields_dict) {
|
||||
let f = this.fields_dict[key];
|
||||
if (f.get_value) {
|
||||
let v = f.get_value() || f.df.default;
|
||||
let v = f.get_value();
|
||||
if (!v && f.df.include_default) {
|
||||
v = f.df.default;
|
||||
}
|
||||
if (f.df.reqd && is_null(typeof v === "string" ? strip_html(v) : v))
|
||||
errors.push(__(f.df.label));
|
||||
|
||||
|
|
|
|||
|
|
@ -579,6 +579,7 @@ frappe.views.ReportView = class ReportView extends frappe.views.ListView {
|
|||
options: y_fields,
|
||||
description: __("Showing only Numeric fields from Report"),
|
||||
default: defaults.y_axes ? defaults.y_axes.join(", ") : null,
|
||||
include_default: true,
|
||||
},
|
||||
{
|
||||
label: __("Chart Type"),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue