[REF] trolls.convert: missed an opportunity to reuse a beautiful association list.

bzr revid: vmt@openerp.com-20130327155917-xaepclhoazgw51ef
This commit is contained in:
Vo Minh Thu 2013-03-27 16:59:17 +01:00
parent 92aace0c13
commit 4613a97c01
1 changed files with 2 additions and 5 deletions

View File

@ -294,7 +294,8 @@ form: module.record_id""" % (xml_id,)
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_rml'),('xml','report_xml'),('xsl','report_xsl'),
('attachment','attachment'),('attachment_use','attachment_use'), ('usage','usage')):
('attachment','attachment'),('attachment_use','attachment_use'), ('usage','usage'),
('report_type', 'report_type'), ('parser', 'parser')):
if rec.get(field):
res[dest] = rec.get(field).encode('utf8')
if rec.get('auto'):
@ -304,10 +305,6 @@ form: module.record_id""" % (xml_id,)
res['report_sxw_content'] = sxw_content
if rec.get('header'):
res['header'] = eval(rec.get('header','False'))
if rec.get('report_type'):
res['report_type'] = rec.get('report_type')
if rec.get('parser'):
res['parser'] = rec.get('parser')
res['multi'] = rec.get('multi') and eval(rec.get('multi','False'))