This commit is contained in:
Nabin Hait 2014-05-30 14:32:45 +05:30
parent 12ecaac182
commit ad96fbbbb1

View file

@ -95,10 +95,10 @@ class UnicodeWriter:
def check_record(d):
"""check for mandatory, select options, dates. these should ideally be in doclist"""
from frappe.utils.dateutils import parse_date
d = frappe.get_doc(d)
doc = frappe.get_doc(d)
for key in d:
docfield = d.meta.get_field(key)
docfield = doc.meta.get_field(key)
val = d[key]
if docfield:
if docfield.reqd and (val=='' or val==None):