OpenERP - XML - How to hide the report tag?



Good morning,


I have to show/hide a report tag in a report.xml file depending on the state of the object, but the following code does not work, when i update de OpenERP module, it shows me an error message:


"openerp Invalid attribute attrs for element report"


Here ir the code:



<?xml version="1.0" encoding="utf-8"?>
<openerp>
<data>

<report
auto="False"
id="partidas_contralor"
model="grp.account.partidas.contralor.header"
name="grp.account.partidas.contralor.header"
rml="grp_partidas_contralor/report/partidas_contralor.rml"
string="Imprimir partida contralor"
header="True"
/>

<report
auto="False"
id="declaracion_jurada"
model="grp.account.partidas.contralor.header"
name="grp.declaracion_jurada_partidas_print"
rml="grp_partidas_contralor/report/declaracion_jurada.rml"
string="Imprimir declaraciĆ³n jurada"
header="True"
attrs="{'invisible':[('state','!=','draft')]}"
/>

</data>
</openerp>


Thanks in advance.


No comments:

Post a Comment