[minor] ignore link validation for reports

This commit is contained in:
Rushabh Mehta 2017-06-27 13:06:54 +05:30
parent 760ab551bb
commit 90d905c809
2 changed files with 3 additions and 1 deletions

View file

@ -1537,7 +1537,7 @@ frappe.ui.form.ControlLink = frappe.ui.form.ControlData.extend({
// validate the value just entered
var me = this;
if(this.df.options=="[Select]") {
if(this.df.options=="[Select]" || this.df.ignore_link_validation) {
callback(value);
return;
}

View file

@ -306,6 +306,7 @@ frappe.views.QueryReport = Class.extend({
var f = me.page.add_field(df);
$(f.wrapper).addClass("filters pull-left");
me.filters.push(f);
if(df["default"]) {
f.set_input(df["default"]);
}
@ -327,6 +328,7 @@ frappe.views.QueryReport = Class.extend({
}
f.set_mandatory && f.set_mandatory(f.$input.val());
}
df.ignore_link_validation = true;
}
});