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