user1529289
user1529289

Reputation:

Openerp RML Report Print on Menu

How to print rml report by clicking on menu in openerp? Without opening any wizard. Is i have to make any action and return on menu click action? Please explain with example.

Upvotes: 4

Views: 2799

Answers (1)

Don Kirkby
Don Kirkby

Reputation: 56240

You have to declare the report with a <report> tag. Here's an example from the OpenERP documentation.

<?xml version="1.0"?>
<openerp>
        <data>
                <report
                        id="report_sale_order"
                        string="Print Order"
                        model="sale.order"
                        name="sale.order"
                        rml="sale/report/order.rml"
                        auto="False"
                        header="False"/>
        </data>
</openerp>

Before you're ready to do that, you'll need to create the report file and the parser. The core modules all use SXW report files to generate RML files, and then run the report from the RML files. Personally, I prefer to just work directly with the RML files. There's also a Mako template engine, but I haven't tried it yet.

Upvotes: 2

Related Questions