|
| 1 | +.. image:: https://odoo-community.org/readme-banner-image |
| 2 | + :target: https://odoo-community.org/get-involved?utm_source=readme |
| 3 | + :alt: Odoo Community Association |
| 4 | + |
| 5 | +=========== |
| 6 | +XML Reports |
| 7 | +=========== |
| 8 | + |
| 9 | +.. |
| 10 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 11 | + !! This file is generated by oca-gen-addon-readme !! |
| 12 | + !! changes will be overwritten. !! |
| 13 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 14 | + !! source digest: sha256:ae8dbb5c7fd44cf63b6044b05c8f8dc9146a383e2e5176552c8af4d2adda50e8 |
| 15 | + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 16 | +
|
| 17 | +.. |badge1| image:: https://img.shields.io/badge/maturity-Production%2FStable-green.png |
| 18 | + :target: https://odoo-community.org/page/development-status |
| 19 | + :alt: Production/Stable |
| 20 | +.. |badge2| image:: https://img.shields.io/badge/license-AGPL--3-blue.png |
| 21 | + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html |
| 22 | + :alt: License: AGPL-3 |
| 23 | +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github |
| 24 | + :target: https://github.com/OCA/reporting-engine/tree/19.0/report_xml |
| 25 | + :alt: OCA/reporting-engine |
| 26 | +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png |
| 27 | + :target: https://translation.odoo-community.org/projects/reporting-engine-19-0/reporting-engine-19-0-report_xml |
| 28 | + :alt: Translate me on Weblate |
| 29 | +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png |
| 30 | + :target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=19.0 |
| 31 | + :alt: Try me on Runboat |
| 32 | + |
| 33 | +|badge1| |badge2| |badge3| |badge4| |badge5| |
| 34 | + |
| 35 | +This module was written to extend the functionality of the reporting |
| 36 | +engine to support XML reports and allow modules to generate them by code |
| 37 | +or by QWeb templates. |
| 38 | + |
| 39 | +**Table of contents** |
| 40 | + |
| 41 | +.. contents:: |
| 42 | + :local: |
| 43 | + |
| 44 | +Use Cases / Context |
| 45 | +=================== |
| 46 | + |
| 47 | +We create this module to allow the system to generate and download XMLs |
| 48 | +as reports. |
| 49 | + |
| 50 | +Otherwise, the system can generate XMLs, but will be downloaded as HTML |
| 51 | +or PDF. |
| 52 | + |
| 53 | +Installation |
| 54 | +============ |
| 55 | + |
| 56 | +To install this module, you need to: |
| 57 | + |
| 58 | +- Install `lxml <http://lxml.de/>`__ in Odoo's ``$PYTHONPATH``. |
| 59 | +- Install the repository |
| 60 | + `reporting-engine <https://github.com/OCA/reporting-engine>`__. |
| 61 | + |
| 62 | +But this module does nothing for the end user by itself, so if you have |
| 63 | +it installed it's probably because there is another module that depends |
| 64 | +on it. |
| 65 | + |
| 66 | +Usage |
| 67 | +===== |
| 68 | + |
| 69 | +This module is intended as a base engine for other modules to use it, so |
| 70 | +no direct result if you are a user. |
| 71 | + |
| 72 | +If you are a developer |
| 73 | +---------------------- |
| 74 | + |
| 75 | +To learn from an example, just check the `demo |
| 76 | +report <https://github.com/OCA/reporting-engine/blob/13.0/report_xml/demo/demo_report.xml>`__ |
| 77 | +on GitHub for the model ``res.company`` or check it in interface from |
| 78 | +companies views. |
| 79 | + |
| 80 | +To develop with this module, you need to: |
| 81 | + |
| 82 | +- Create a module. |
| 83 | +- Make it depend on this one. |
| 84 | +- Follow `instructions to create |
| 85 | + reports <https://www.odoo.com/documentation/13.0/reference/reports.html>`__ |
| 86 | + having in mind that the ``report_type`` field in your |
| 87 | + ``ir.actions.report`` record must be ``qweb-xml``. |
| 88 | + |
| 89 | +In case you want to create a `custom |
| 90 | +report <https://www.odoo.com/documentation/13.0/reference/reports.html#custom-reports>`__, |
| 91 | +the instructions remain the same as for HTML reports, and the method |
| 92 | +that you must override is also called ``_get_report_values``, even when |
| 93 | +this time you are creating a XML report. |
| 94 | + |
| 95 | +You can make your custom report inherit ``report.report_xml.abstract``, |
| 96 | +name it in such way ``report.<module.report_name>``. Also you can add a |
| 97 | +XSD file for report validation into ``xsd_schema`` field of your report |
| 98 | +(check `report |
| 99 | +definition <https://github.com/OCA/reporting-engine/blob/13.0/report_xml/demo/report.xml>`__) |
| 100 | +and have XSD automatic checking for free. |
| 101 | + |
| 102 | +You can customize rendering process and validation way via changing |
| 103 | +logic of ``generate_report`` and ``validate_report`` methods in your |
| 104 | +report class. |
| 105 | + |
| 106 | +You can visit |
| 107 | +``http://<server-address>/report/xml/<module.report_name>/<ids>`` to see |
| 108 | +your XML report online as a web page. |
| 109 | + |
| 110 | +For further information, please visit: |
| 111 | + |
| 112 | +- https://www.odoo.com/forum/help-1 |
| 113 | +- https://github.com/OCA/reporting-engine |
| 114 | + |
| 115 | +Bug Tracker |
| 116 | +=========== |
| 117 | + |
| 118 | +Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/issues>`_. |
| 119 | +In case of trouble, please check there if your issue has already been reported. |
| 120 | +If you spotted it first, help us to smash it by providing a detailed and welcomed |
| 121 | +`feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_xml%0Aversion:%2019.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_. |
| 122 | + |
| 123 | +Do not contact contributors directly about support or help with technical issues. |
| 124 | + |
| 125 | +Credits |
| 126 | +======= |
| 127 | + |
| 128 | +Authors |
| 129 | +------- |
| 130 | + |
| 131 | +* Tecnativa |
| 132 | +* Avoin.Systems |
| 133 | + |
| 134 | +Contributors |
| 135 | +------------ |
| 136 | + |
| 137 | +- `Dixmit <https://www.dixmit.com>`__ |
| 138 | + |
| 139 | + - Enric Tobella |
| 140 | + |
| 141 | +- `Tecnativa <https://www.tecnativa.com>`__: |
| 142 | + |
| 143 | + - Jairo Llopis |
| 144 | + |
| 145 | +- `Avoin.Systems <https://avoin.systems/>`__: |
| 146 | + |
| 147 | + - Tatiana Deribina |
| 148 | + |
| 149 | + |
| 150 | + |
| 151 | +Other credits |
| 152 | +------------- |
| 153 | + |
| 154 | +- Icon taken from http://commons.wikimedia.org/wiki/File:Text-xml.svg |
| 155 | + |
| 156 | +Maintainers |
| 157 | +----------- |
| 158 | + |
| 159 | +This module is maintained by the OCA. |
| 160 | + |
| 161 | +.. image:: https://odoo-community.org/logo.png |
| 162 | + :alt: Odoo Community Association |
| 163 | + :target: https://odoo-community.org |
| 164 | + |
| 165 | +OCA, or the Odoo Community Association, is a nonprofit organization whose |
| 166 | +mission is to support the collaborative development of Odoo features and |
| 167 | +promote its widespread use. |
| 168 | + |
| 169 | +This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/19.0/report_xml>`_ project on GitHub. |
| 170 | + |
| 171 | +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. |
0 commit comments