[fix][hr] pull salary structure in salary slip

This commit is contained in:
Nabin Hait 2013-07-10 14:16:59 +05:30
parent 2d0f99b80c
commit bffe5fb2cf

View file

@ -37,10 +37,13 @@ def get_mapped_doclist(from_doctype, from_docname, table_maps, target_doclist=[]
source_meta = webnotes.get_doctype(from_doctype)
target_meta = webnotes.get_doctype(table_maps[from_doctype]["doctype"])
# main
if target_doclist:
target_doc = webnotes.doc(target_doclist[0])
if isinstance(target_doclist[0], dict):
target_doc = webnotes.doc(fielddata=target_doclist[0])
else:
target_doc = target_doclist[0]
else:
target_doc = webnotes.new_doc(table_maps[from_doctype]["doctype"])