From 4613a97c0101cc906b4c75d10015d88bac7c72c5 Mon Sep 17 00:00:00 2001 From: Vo Minh Thu Date: Wed, 27 Mar 2013 16:59:17 +0100 Subject: [PATCH] [REF] trolls.convert: missed an opportunity to reuse a beautiful association list. bzr revid: vmt@openerp.com-20130327155917-xaepclhoazgw51ef --- openerp/tools/convert.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/openerp/tools/convert.py b/openerp/tools/convert.py index cf8633f7a82..aaa29f2f9d3 100644 --- a/openerp/tools/convert.py +++ b/openerp/tools/convert.py @@ -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'))