refactor upload attendance for doclist global
This commit is contained in:
parent
ea810509d3
commit
7782e83d33
@ -9,7 +9,8 @@ from webnotes.utils import cstr, add_days, date_diff
|
||||
from webnotes import msgprint, _
|
||||
from webnotes.utils.datautils import UnicodeWriter
|
||||
|
||||
doclist = None
|
||||
# doclist = None
|
||||
doclist = webnotes.local('uploadattendance_doclist')
|
||||
|
||||
class DocType():
|
||||
def __init__(self, doc, doclist=[]):
|
||||
@ -22,8 +23,7 @@ def get_template():
|
||||
raise webnotes.PermissionError
|
||||
|
||||
args = webnotes.form_dict
|
||||
global doclist
|
||||
doclist = webnotes.model.doctype.get("Attendance")
|
||||
webnotes.local.uploadattendance_doclist = webnotes.model.doctype.get("Attendance")
|
||||
|
||||
w = UnicodeWriter()
|
||||
w = add_header(w)
|
||||
@ -144,4 +144,4 @@ def upload():
|
||||
webnotes.conn.rollback()
|
||||
else:
|
||||
webnotes.conn.commit()
|
||||
return {"messages": ret, "error": error}
|
||||
return {"messages": ret, "error": error}
|
||||
|
Loading…
x
Reference in New Issue
Block a user