[fix] [minor] dont submit from import if doc is not submittable #853

This commit is contained in:
Nabin Hait 2013-09-12 18:38:24 +05:30
parent 9df394ca44
commit ec35e5d1f7

View file

@ -347,6 +347,11 @@ def upload(rows = None, submit_after_import=None, ignore_encoding_errors=False):
doctype_parentfield = {}
column_idx_to_fieldname = {}
column_idx_to_fieldtype = {}
if submit_after_import and not cint(webnotes.conn.get_value("DocType",
doctype, "is_submittable")):
submit_after_import = False
parenttype = get_header_row(data_keys.parent_table)