Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Where does 'objects' gets its data from?

By
Yakito
on 7/2/13, 4:05 PM 1,419 views

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

1
kalmenchia
On 7/2/13, 9:24 PM

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.

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.

Yakito
on 7/2/13, 9:29 PM

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 !

kalmenchia
on 7/2/13, 9:36 PM

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!

Yakito
on 7/2/13, 9:47 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

Asked: 7/2/13, 4:05 PM
Seen: 1419 times
Last updated: 3/16/15, 8:10 AM