From d74da75a8d811cf9fa37455fddecad6dff5ecedf Mon Sep 17 00:00:00 2001 From: Shreya Shah Date: Tue, 20 Nov 2018 15:57:21 +0530 Subject: [PATCH] fix: Add download with data checkbox (#6494) --- frappe/core/doctype/data_import/data_import.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/frappe/core/doctype/data_import/data_import.js b/frappe/core/doctype/data_import/data_import.js index 36c2488aab..6177aaf86f 100644 --- a/frappe/core/doctype/data_import/data_import.js +++ b/frappe/core/doctype/data_import/data_import.js @@ -200,6 +200,13 @@ frappe.data_import.download_dialog = function(frm) { "options": "Excel\nCSV", "default": "Excel" }, + { + "label": __("Download with Data"), + "fieldname": "with_data", + "fieldtype": "Check", + "hidden": !frm.doc.overwrite, + "default": 1 + }, { "label": __("Select All"), "fieldname": "select_all", @@ -270,7 +277,7 @@ frappe.data_import.download_dialog = function(frm) { doctype: frm.doc.reference_doctype, parent_doctype: frm.doc.reference_doctype, select_columns: JSON.stringify(columns), - with_data: frm.doc.overwrite, + with_data: frm.doc.overwrite && data.with_data, all_doctypes: true, file_type: data.file_type, template: true