fix related field create problem

bzr revid: husen@husen-laptop-20101011121753-geotbl0iwqf3cqwe
This commit is contained in:
husen 2010-10-11 17:47:53 +05:30
parent 595a07e49e
commit 3e44b15833
1 changed files with 1 additions and 1 deletions

View File

@ -300,7 +300,7 @@ form: module.record_id""" % (xml_id,)
for dest,f in (('name','string'),('model','model'),('report_name','name')):
res[dest] = rec.get(f,'').encode('utf8')
assert res[dest], "Attribute %s of report is empty !" % (f,)
for field,dest in (('rml','report_rml'),('file','report_file'),('xml','report_xml'),('xsl','report_xsl'),('attachment','attachment'),('attachment_use','attachment_use')):
for field,dest in (('rml','report_rml'),('file','report_rml'),('xml','report_xml'),('xsl','report_xsl'),('attachment','attachment'),('attachment_use','attachment_use')):
if rec.get(field):
res[dest] = rec.get(field).encode('utf8')
if rec.get('auto'):