|
|
@@ -7,15 +7,20 @@ frappe.ui.form.on('Data Import', { |
|
|
|
frm.set_value("action", ""); |
|
|
|
} |
|
|
|
|
|
|
|
frm.set_query("reference_doctype", function() { |
|
|
|
return { |
|
|
|
"filters": { |
|
|
|
"issingle": 0, |
|
|
|
"istable": 0, |
|
|
|
"name": ['in', frappe.boot.user.can_import] |
|
|
|
} |
|
|
|
}; |
|
|
|
}); |
|
|
|
frappe.call({ |
|
|
|
method: "frappe.core.doctype.data_import.data_import.get_importable_doc", |
|
|
|
callback: function (r) { |
|
|
|
frm.set_query("reference_doctype", function () { |
|
|
|
return { |
|
|
|
"filters": { |
|
|
|
"issingle": 0, |
|
|
|
"istable": 0, |
|
|
|
"name": ['in', r.message] |
|
|
|
} |
|
|
|
}; |
|
|
|
}); |
|
|
|
} |
|
|
|
}), |
|
|
|
|
|
|
|
// should never check public |
|
|
|
frm.fields_dict["import_file"].df.is_private = 1; |
|
|
|