fix: copy paste from Excel (issue #24371)
This commit is contained in:
parent
a1e1a32ea1
commit
0832f3b01d
1 changed files with 10 additions and 2 deletions
|
|
@ -47,7 +47,11 @@ frappe.ui.form.ControlTable = class ControlTable extends frappe.ui.form.Control
|
|||
data[0].forEach((column) => {
|
||||
fieldnames.push(this.get_field(column));
|
||||
var df = frappe.meta.get_docfield(doctype, this.get_field(column));
|
||||
fieldtypes.push(df.fieldtype);
|
||||
if (df) {
|
||||
fieldtypes.push(df.fieldtype);
|
||||
} else {
|
||||
fieldtypes.push("");
|
||||
}
|
||||
});
|
||||
data.shift();
|
||||
} else {
|
||||
|
|
@ -62,7 +66,11 @@ frappe.ui.form.ControlTable = class ControlTable extends frappe.ui.form.Control
|
|||
) {
|
||||
fieldnames.push(column.fieldname);
|
||||
var df = frappe.meta.get_docfield(doctype, column.fieldname);
|
||||
fieldtypes.push(df.fieldtype);
|
||||
if (df) {
|
||||
fieldtypes.push(df.fieldtype);
|
||||
} else {
|
||||
fieldtypes.push("");
|
||||
}
|
||||
target_column_matched = true;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue