@@ -176,7 +176,7 @@ def get_template(doctype=None, parent_doctype=None, all_doctypes="No", with_data | |||||
frappe.permissions.can_export(parent_doctype, raise_exception=True) | frappe.permissions.can_export(parent_doctype, raise_exception=True) | ||||
# get permitted data only | # get permitted data only | ||||
data = reportview.execute(doctype, fields="*") | |||||
data = reportview.execute(doctype, fields=["*"], limit_page_length=None) | |||||
for doc in data: | for doc in data: | ||||
# add main table | # add main table | ||||
row_group = [] | row_group = [] | ||||
@@ -512,7 +512,7 @@ def export_json(doctype, name, path): | |||||
del d["parent"] | del d["parent"] | ||||
del d["name"] | del d["name"] | ||||
d["__islocal"] = 1 | d["__islocal"] = 1 | ||||
outfile.write(json.dumps(doclist, default=json_handler, indent=1, sort_keys=True)) | |||||
outfile.write(json.dumps([doclist], default=json_handler, indent=1, sort_keys=True)) | |||||
def import_doclist(path, overwrite=False, ignore_links=False, ignore_insert=False, insert=False): | def import_doclist(path, overwrite=False, ignore_links=False, ignore_insert=False, insert=False): | ||||
import os | import os | ||||
@@ -97,7 +97,7 @@ login.login_handlers = { | |||||
} else { | } else { | ||||
window.location.href = "/index"; | window.location.href = "/index"; | ||||
} | } | ||||
} else if(window.is_sign_up) { | |||||
} else if(["#signup", "#forgot"].indexOf(window.location.hash)!==-1) { | |||||
frappe.msgprint(data.message); | frappe.msgprint(data.message); | ||||
} | } | ||||
}, | }, | ||||
@@ -11,7 +11,7 @@ from frappe.utils import encode, cstr, cint, flt | |||||
def read_csv_content_from_uploaded_file(ignore_encoding=False): | def read_csv_content_from_uploaded_file(ignore_encoding=False): | ||||
if getattr(frappe, "uploaded_file", None): | if getattr(frappe, "uploaded_file", None): | ||||
with open(frappe.uploaded_file, "r") as upfile: | with open(frappe.uploaded_file, "r") as upfile: | ||||
fcontent = upfile | |||||
fcontent = upfile.read() | |||||
else: | else: | ||||
from frappe.utils.file_manager import get_uploaded_content | from frappe.utils.file_manager import get_uploaded_content | ||||
fname, fcontent = get_uploaded_content() | fname, fcontent = get_uploaded_content() | ||||
@@ -36,10 +36,10 @@ $.extend(frappe, { | |||||
dataType: "json", | dataType: "json", | ||||
statusCode: { | statusCode: { | ||||
404: function(xhr) { | 404: function(xhr) { | ||||
msgprint("Not Found"); | |||||
frappe.msgprint("Not Found"); | |||||
}, | }, | ||||
403: function(xhr) { | 403: function(xhr) { | ||||
msgprint("Not Permitted"); | |||||
frappe.msgprint("Not Permitted"); | |||||
}, | }, | ||||
200: function(data, xhr) { | 200: function(data, xhr) { | ||||
if(opts.callback) | if(opts.callback) | ||||