Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
5603 Vistas

Hello,

I am trying to create my first dynamic report, but I keep getting a damaged PDF as a result so nothing will open. If I remove the lines that call the dynamic content like:

<para style="Standard">[[repeatIn(objects,'p')]][[p.name]]</para>

So, trying to understand what is going on I am wondering if objects in my module is doing what its suppose to do. Is there anyway I can debug the content of objects to see whats going on and why the report is not working?

Have anyone else experienced a corrupted PDF file when trying to add dynamic content?

Thanks

Avatar
Descartar
Mejor respuesta

Hi ,

The objects you mentioned in the nutshell is the model that you are working on , let say you are working on the sales order , then the object is the sales order and anything that defined in the model of SALES ORDER can be access thru this object.

but you have understand the concept of the RML report of OpenERP , the best place to go is

https://doc.openerp.com/6.0/developer/3_11_reports/11_2_XSL-RML_reports/

HTH.

Avatar
Descartar
Autor

Thanks Kalmenchia!! So basically if I am calling a report like report_sxw.report_sxw('report.prov', 'product.product', 'addons/sim/report.rml',parser= folio_report) then under the .rml file the object will be 'product.product', right? Thats "automatically" or I have to 'pass' the object somehow? I am asking this because for some reason when I create dynamic reports I always get a damaged PDF so I am trying to debug everything to understand whats wrong. Thanks again for your time.

yes , as long as you do this right , 1. the report defination py file, rml are in getting the right model ,eg yours , you already called the "product.product" , so it will get from product model . When u get a corrupted pdf , it has many reasons , perhaps , your RML template is not correct , and the best if you are going to use the RML's way then you have learn RML syntax or ELSE , there are a few options available , http://blog.instant-erp.com/2013/05/the-7-seven-options-of-reports-in.html and more is coming i believe !

Autor

Thanks again. I understand RML syntax pretty much. I am testing with a super simple report and as soon as I remove the "dynamic" part from the RML file, for example "<para style="Standard">[[repeatIn(objects,'p')]][[p.name]]</para>" it works, thats why I am trying to understand what can be so wrong with that line that is producing a corrupted PDF. If you have any idea please let me know. Thanks again for your help!

Publicaciones relacionadas Respuestas Vistas Actividad
1
nov 24
1510
0
ago 24
1557
2
nov 23
3518
5
ago 23
9747
2
may 23
2550