TIP: You can type at any time to perform a new search.
XML Reports
report_xml · OCA/reporting-engine
- Repository
- OCA/reporting-engine · module folder · Try on Runboat
- Module version
- 1.0.1
- Category
- Reporting
- Folder size
- 0.37 MB
- License
- AGPL-3
- Application
- No
- Auto-installable
- No
- Website
- https://github.com/OCA/reporting-engine
- Last tracking update
- 2026-08-07 09:06:34
- Authors
- Odoo Community Association (OCA), Avoin.Systems, Tecnativa
- Maintainers
- Odoo Community Association (OCA), Avoin.Systems, Tecnativa
- Committers
- Laurent Mignon (ACSONE), Enric Tobella, Weblate, OCA-git-bot, oca-ci
- Odoo dependencies
- Python dependencies
- None
- System dependencies
- None
- Required by
- l10n_es_facturae
- Description
This module was written to extend the functionality of the reporting engine to support XML reports and allow modules to generate them by code or by QWeb templates.
Code Analysis ⓘ
Views touched (2)
| XML ID | Name | Model | Type | Status |
|---|---|---|---|---|
demo_report_xml_view |
demo_report_xml_view | ir.ui.view | qweb | New |
ir_actions_report_view_form_report_xml |
ir.actions.report.view.form.report.xml | ir.actions.report | form | Inherits base.act_report_xml_view |
HTTP endpoints (2)
| Route(s) | Handler | Auth | Type | Methods | Flags |
|---|---|---|---|---|---|
| (inherited route override) | ReportController.report_download |
inherited | http | ALL | |
| (inherited route override) | ReportController.report_routes |
inherited | http | ALL |
Models touched (2)
New fields (5)
-
report_typeSelectionondelete={'qweb-xml': 'set default'}selection_add=[('qweb-xml', 'XML')] -
xml_declarationBooleanhelp='Add `<?xml encoding="..." version="..."?>` at the start of final report file.'string='XML Declaration' -
xml_encodingSelectionhelp='Encoding for XML reports. If nothing is selected, then UTF-8 will be applied.'selection=[('UTF-8', 'UTF-8')]string='XML Encoding' -
xml_extensionChardefault='xml'help='Extension for XML Reports, by default is `xml`' -
xsd_schemaBinaryattachment=Truehelp='File with XSD Schema for checking content of result report. Can be empty if validation is not required.'string='XSD Validation Schema'
No public methods.
New fields (0)
No new fields.
Public methods (2)-
generate_report(self, ir_report, docids, data=None)@api.modelGenerate and validate XML report. Use incoming `ir_report` settings to setup encoding and XMl declaration for result `xml`. Methods: * `_get_rendering_context` `ir.actions.report` - get report variables. It will call `_get_report_values` of report's class if it's exist. * `render_template` of `ir.actions.report` - get report content * `validate_report` - check result content Args: * ir_report(`ir.actions.report`) - report definition instance in Odoo * docids(list) - IDs of instances for those report will be generated * data(dict, None) - variables for report rendering Returns: * str - result content of report * str - `"xml"` Extra Info: * Default encoding is `UTF-8` -
validate_report(self, xsd_schema_doc, content)@api.modelValidate final report content against value of `xsd_schema` field ("XSD Validation Schema") of `ir.actions.report` via `etree` lib. Args: * xsd_schema_doc(byte-string) - report validation schema * content(str) - report content for validation Raises: * odoo.exceptions.ValidationError - Syntax of final report is wrong Returns: * bool - True
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…
Loading…