fix: Set only once Document Type and Import Type

This commit is contained in:
Faris Ansari 2019-09-25 14:11:21 +05:30
parent 2fc34effb4
commit ebb111aaf8
2 changed files with 6 additions and 6 deletions

View file

@ -61,8 +61,6 @@ frappe.ui.form.on('Data Import Beta', {
frm.trigger('toggle_submit_after_import');
if (frm.doc.import_log && frm.doc.import_log !== '[]') {
// set form as readonly
frm.fields.forEach(f => (f.df.read_only = 1));
frm.disable_save();
}
@ -321,7 +319,7 @@ frappe.ui.form.on('Data Import Beta', {
if (log.success) {
html = __('Successfully imported {0}', [
`<span class="underline">${frappe.utils.get_form_link(
frm.doc.doctype,
frm.doc.reference_doctype,
log.docname,
true
)}<span>`

View file

@ -32,7 +32,8 @@
"in_list_view": 1,
"label": "Document Type",
"options": "DocType",
"reqd": 1
"reqd": 1,
"set_only_once": 1
},
{
"fieldname": "import_type",
@ -40,7 +41,8 @@
"in_list_view": 1,
"label": "Import Type",
"options": "\nInsert New Records\nUpdate Existing Records",
"reqd": 1
"reqd": 1,
"set_only_once": 1
},
{
"depends_on": "eval:!doc.__islocal",
@ -140,7 +142,7 @@
}
],
"hide_toolbar": 1,
"modified": "2019-09-25 12:41:46.836826",
"modified": "2019-09-25 13:03:25.463692",
"modified_by": "Administrator",
"module": "Core",
"name": "Data Import Beta",