How to Get reports in odt format from rml files in

2019-07-14 19:27发布

问题:

I have an RML file that generates a report in PDF format, but how can I generate the same report in ODT format?

回答1:

Under the Administration menu, go to Low Level Objects: Actions: Report Xml. Open the entry for that report, and change the type from pdf to odt.

Just to make this programming related so it doesn't get shuffled off to superuser.com, here's how to configure the report's XML file with this change. Add the type attribute to your report declaration:

<report 
    id="report_location_overview_all"
    type="odt"
    model="stock.location" 
    name="lot.stock.overview_all" 
    string="Location Content (With children)" 
    rml="stock/report/lot_overview_all.rml"/>