Merge branch 'master' into edge
This commit is contained in:
commit
4f4873695b
@ -75,7 +75,6 @@ erpnext.hr.AttendanceControlPanel = wn.ui.form.Controller.extend({
|
||||
r.messages = ["<h4 style='color:green'>Import Successful!</h4>"].
|
||||
concat(r.messages)
|
||||
}
|
||||
console.log(r.messages);
|
||||
|
||||
$.each(r.messages, function(i, v) {
|
||||
var $p = $('<p>').html(v).appendTo($log_wrapper);
|
||||
|
@ -100,7 +100,6 @@ def get_naming_series():
|
||||
def upload():
|
||||
from webnotes.utils.datautils import read_csv_content_from_uploaded_file
|
||||
from webnotes.modules import scrub
|
||||
from core.page.data_import_tool.data_import_tool import check_record, import_doc
|
||||
|
||||
rows = read_csv_content_from_uploaded_file()
|
||||
if not rows:
|
||||
@ -112,6 +111,9 @@ def upload():
|
||||
ret = []
|
||||
error = False
|
||||
|
||||
from webnotes.utils.datautils import check_record, import_doc
|
||||
doctype_dl = webnotes.get_doctype("Attendance")
|
||||
|
||||
for i, row in enumerate(rows[5:]):
|
||||
if not row: continue
|
||||
row_idx = i + 5
|
||||
@ -121,7 +123,7 @@ def upload():
|
||||
d["docstatus"] = webnotes.conn.get_value("Attendance", d.name, "docstatus")
|
||||
|
||||
try:
|
||||
check_record(d)
|
||||
check_record(d, doctype_dl=doctype_dl)
|
||||
ret.append(import_doc(d, "Attendance", 1, row_idx, submit=True))
|
||||
except Exception, e:
|
||||
error = True
|
||||
|
Loading…
x
Reference in New Issue
Block a user