RNG: allow report_type to be imported from xml

bzr revid: p_christ@hol.gr-20081221104530-fn165qyk8m5ilqdm
This commit is contained in:
P. Christeas 2008-12-21 12:45:30 +02:00
parent 68c880cc4f
commit 2c93807e19
2 changed files with 3 additions and 0 deletions

View File

@ -96,6 +96,7 @@
<rng:attribute name="string"/>
<rng:attribute name="model"/>
<rng:attribute name="name"/>
<rng:optional><rng:attribute name="report_type"/></rng:optional>
<rng:optional><rng:attribute name="multi"/></rng:optional>
<rng:optional><rng:attribute name="menu"/></rng:optional>
<rng:optional><rng:attribute name="keyword"/></rng:optional>

View File

@ -270,6 +270,8 @@ form: module.record_id""" % (xml_id,)
res['report_sxw_content'] = sxw_content
if rec.hasAttribute('header'):
res['header'] = eval(rec.getAttribute('header'))
if rec.hasAttribute('report_type'):
res['report_type'] = rec.getAttribute('report_type')
res['multi'] = rec.hasAttribute('multi') and eval(rec.getAttribute('multi'))
xml_id = rec.getAttribute('id').encode('utf8')
self._test_xml_id(xml_id)