@@ -1,2 +1,2 @@ | |||||
from __future__ import unicode_literals | from __future__ import unicode_literals | ||||
__version__ = "5.0.7" | |||||
__version__ = "5.0.8" |
@@ -240,8 +240,13 @@ def validate_fields(meta): | |||||
frappe.throw(_("Options requried for Link or Table type field {0} in row {1}").format(d.label, d.idx)) | frappe.throw(_("Options requried for Link or Table type field {0} in row {1}").format(d.label, d.idx)) | ||||
if d.options=="[Select]" or d.options==d.parent: | if d.options=="[Select]" or d.options==d.parent: | ||||
return | return | ||||
if d.options != d.parent and not frappe.db.exists("DocType", d.options): | |||||
frappe.throw(_("Options must be a valid DocType for field {0} in row {1}").format(d.label, d.idx)) | |||||
if d.options != d.parent: | |||||
options = frappe.db.get_value("DocType", d.options, "name") | |||||
if not options: | |||||
frappe.throw(_("Options must be a valid DocType for field {0} in row {1}").format(d.label, d.idx)) | |||||
else: | |||||
# fix case | |||||
d.options = options | |||||
def check_hidden_and_mandatory(d): | def check_hidden_and_mandatory(d): | ||||
if d.hidden and d.reqd and not d.default: | if d.hidden and d.reqd and not d.default: | ||||
@@ -4,7 +4,7 @@ app_title = "Frappe Framework" | |||||
app_publisher = "Frappe Technologies Pvt. Ltd." | app_publisher = "Frappe Technologies Pvt. Ltd." | ||||
app_description = "Full Stack Web Application Framework in Python" | app_description = "Full Stack Web Application Framework in Python" | ||||
app_icon = "octicon octicon-circuit-board" | app_icon = "octicon octicon-circuit-board" | ||||
app_version = "5.0.7" | |||||
app_version = "5.0.8" | |||||
app_color = "orange" | app_color = "orange" | ||||
app_email = "support@frappe.io" | app_email = "support@frappe.io" | ||||
@@ -121,9 +121,7 @@ def validate_print_permission(doc): | |||||
return | return | ||||
for ptype in ("read", "print"): | for ptype in ("read", "print"): | ||||
if (not frappe.has_permission(doc.doctype, ptype, doc) | |||||
and not frappe.has_website_permission(doc.doctype, ptype, doc)): | |||||
if not frappe.has_permission(doc.doctype, ptype, doc): | |||||
raise frappe.PermissionError(_("No {0} permission").format(ptype)) | raise frappe.PermissionError(_("No {0} permission").format(ptype)) | ||||
def get_letter_head(doc, no_letterhead): | def get_letter_head(doc, no_letterhead): | ||||
@@ -1,6 +1,6 @@ | |||||
from setuptools import setup, find_packages | from setuptools import setup, find_packages | ||||
version = "5.0.7" | |||||
version = "5.0.8" | |||||
with open("requirements.txt", "r") as f: | with open("requirements.txt", "r") as f: | ||||
install_requires = f.readlines() | install_requires = f.readlines() | ||||