This question has been flagged
1 Reply
4117 Views

Hello,

I am trying to create my first report using OpenOffice extension. I can connect to my modules and loop through them but each time I try to export to RML I get errors, even with a simple text only (no OpenERP fields)

The error is:

2013-06-22 16:44:56,544 4390 ERROR openerp3 openerp.netsvc: Argument 'element' has incorrect type (expected lxml.etree._Element, got NoneType)

I am wondering if after installing the extension and the app into OpenERP there is anything else I need to install in order to be able to make the conversion from the sxw to rml.

Any tip much appreciated!

Avatar
Discard
Best Answer

Hi Yakito,

You can convert your .sxw file into .rml file by the help of openerp_sxw2rml. You can find it in base_report_designer module.

  1. Create a simple .sxw file. No loops or no programming code in it. Just simple title of report.

  2. Go to terminal & go to openerp_sxw2rml module path. Then write below command

    python openerp_sxw2rml.py your_sxw_file_path your_rml_file_path

    here, your_rml_file_path is to create .rml file of your desired path.

  3. Now your .rml file is ready. Now you just need to create report tag in report.xml file

    <report
        auto="False"
        id="report_id"
        menu="True"
        model="object.object"
        name="report_name"
        rml="your_rml_path"
        string="Your Report String"/>
    

    Now just restart the server and update your module. Then you can see your report in your object form view shortcut, the object you've specified in your <report></report> tag.

Hope now your report will work.

Thanks.

Avatar
Discard
Author

Hi! first of all thanks a lot. I have followed all the steps but I am not sure how or were exactly should I be able to see the link to generate the report. I see the new report under settings->technical->actions->report. Where I am suppose to see a link to be able to generate the PDF? Thanks A LOT for your time!

In client there is no path defined for reports. Report path depends on reports attributes. If menu="True" then report will be in its object's shortcut else it can be generated from wizard or anywhere by passing report name in action. You can see example of report generated from wizard in many addons modules.