Skip to content

Commit acd45cc

Browse files
committed
[MIG] report_xml: Migration to 19.0
1 parent 3b7b138 commit acd45cc

File tree

6 files changed

+78
-35
lines changed

6 files changed

+78
-35
lines changed

report_xml/README.rst

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ XML Reports
2121
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
2222
:alt: License: AGPL-3
2323
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github
24-
:target: https://github.com/OCA/reporting-engine/tree/18.0/report_xml
24+
:target: https://github.com/OCA/reporting-engine/tree/19.0/report_xml
2525
:alt: OCA/reporting-engine
2626
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
27-
:target: https://translation.odoo-community.org/projects/reporting-engine-18-0/reporting-engine-18-0-report_xml
27+
:target: https://translation.odoo-community.org/projects/reporting-engine-19-0/reporting-engine-19-0-report_xml
2828
:alt: Translate me on Weblate
2929
.. |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=18.0
30+
:target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=19.0
3131
:alt: Try me on Runboat
3232

3333
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -41,6 +41,15 @@ or by QWeb templates.
4141
.. contents::
4242
:local:
4343

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+
4453
Installation
4554
============
4655

@@ -109,7 +118,7 @@ Bug Tracker
109118
Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/issues>`_.
110119
In case of trouble, please check there if your issue has already been reported.
111120
If you spotted it first, help us to smash it by providing a detailed and welcomed
112-
`feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_xml%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
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**>`_.
113122

114123
Do not contact contributors directly about support or help with technical issues.
115124

@@ -125,7 +134,9 @@ Authors
125134
Contributors
126135
------------
127136

128-
- Enric Tobella <[email protected]>
137+
- `Dixmit <https://www.dixmit.com>`__
138+
139+
- Enric Tobella
129140

130141
- `Tecnativa <https://www.tecnativa.com>`__:
131142

@@ -155,6 +166,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
155166
mission is to support the collaborative development of Odoo features and
156167
promote its widespread use.
157168

158-
This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/18.0/report_xml>`_ project on GitHub.
169+
This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/19.0/report_xml>`_ project on GitHub.
159170

160171
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

report_xml/__manifest__.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# License AGPL-3.0 or later (https://www.gnuorg/licenses/agpl.html).
33
{
44
"name": "XML Reports",
5-
"version": "18.0.1.0.1",
5+
"version": "19.0.1.0.0",
66
"category": "Reporting",
77
"website": "https://github.com/OCA/reporting-engine",
88
"development_status": "Production/Stable",
@@ -24,10 +24,5 @@
2424
"demo/report.xml", # register report in the system
2525
"demo/demo_report.xml", # report body definition
2626
],
27-
"external_dependencies": {
28-
"python": [ # Python third party libraries required for module
29-
"lxml" # XML and HTML with Python
30-
]
31-
},
3227
"post_init_hook": "post_init_hook",
3328
}

report_xml/readme/CONTEXT.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
We create this module to allow the system to generate and download XMLs as reports.
2+
3+
Otherwise, the system can generate XMLs, but will be downloaded as HTML or PDF.

report_xml/readme/CONTRIBUTORS.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
- Enric Tobella \<<[email protected]>\>
1+
- [Dixmit](https://www.dixmit.com)
2+
- Enric Tobella
23

34
- [Tecnativa](https://www.tecnativa.com):
45
- Jairo Llopis

report_xml/static/description/index.html

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -374,30 +374,38 @@ <h1>XML Reports</h1>
374374
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
375375
!! source digest: sha256:ae8dbb5c7fd44cf63b6044b05c8f8dc9146a383e2e5176552c8af4d2adda50e8
376376
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
377-
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/reporting-engine/tree/18.0/report_xml"><img alt="OCA/reporting-engine" src="https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/reporting-engine-18-0/reporting-engine-18-0-report_xml"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&amp;target_branch=18.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
377+
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Production/Stable" src="https://img.shields.io/badge/maturity-Production%2FStable-green.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/license-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/reporting-engine/tree/19.0/report_xml"><img alt="OCA/reporting-engine" src="https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/reporting-engine-19-0/reporting-engine-19-0-report_xml"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&amp;target_branch=19.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
378378
<p>This module was written to extend the functionality of the reporting
379379
engine to support XML reports and allow modules to generate them by code
380380
or by QWeb templates.</p>
381381
<p><strong>Table of contents</strong></p>
382382
<div class="contents local topic" id="contents">
383383
<ul class="simple">
384-
<li><a class="reference internal" href="#installation" id="toc-entry-1">Installation</a></li>
385-
<li><a class="reference internal" href="#usage" id="toc-entry-2">Usage</a><ul>
386-
<li><a class="reference internal" href="#if-you-are-a-developer" id="toc-entry-3">If you are a developer</a></li>
384+
<li><a class="reference internal" href="#use-cases-context" id="toc-entry-1">Use Cases / Context</a></li>
385+
<li><a class="reference internal" href="#installation" id="toc-entry-2">Installation</a></li>
386+
<li><a class="reference internal" href="#usage" id="toc-entry-3">Usage</a><ul>
387+
<li><a class="reference internal" href="#if-you-are-a-developer" id="toc-entry-4">If you are a developer</a></li>
387388
</ul>
388389
</li>
389-
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-4">Bug Tracker</a></li>
390-
<li><a class="reference internal" href="#credits" id="toc-entry-5">Credits</a><ul>
391-
<li><a class="reference internal" href="#authors" id="toc-entry-6">Authors</a></li>
392-
<li><a class="reference internal" href="#contributors" id="toc-entry-7">Contributors</a></li>
393-
<li><a class="reference internal" href="#other-credits" id="toc-entry-8">Other credits</a></li>
394-
<li><a class="reference internal" href="#maintainers" id="toc-entry-9">Maintainers</a></li>
390+
<li><a class="reference internal" href="#bug-tracker" id="toc-entry-5">Bug Tracker</a></li>
391+
<li><a class="reference internal" href="#credits" id="toc-entry-6">Credits</a><ul>
392+
<li><a class="reference internal" href="#authors" id="toc-entry-7">Authors</a></li>
393+
<li><a class="reference internal" href="#contributors" id="toc-entry-8">Contributors</a></li>
394+
<li><a class="reference internal" href="#other-credits" id="toc-entry-9">Other credits</a></li>
395+
<li><a class="reference internal" href="#maintainers" id="toc-entry-10">Maintainers</a></li>
395396
</ul>
396397
</li>
397398
</ul>
398399
</div>
400+
<div class="section" id="use-cases-context">
401+
<h2><a class="toc-backref" href="#toc-entry-1">Use Cases / Context</a></h2>
402+
<p>We create this module to allow the system to generate and download XMLs
403+
as reports.</p>
404+
<p>Otherwise, the system can generate XMLs, but will be downloaded as HTML
405+
or PDF.</p>
406+
</div>
399407
<div class="section" id="installation">
400-
<h2><a class="toc-backref" href="#toc-entry-1">Installation</a></h2>
408+
<h2><a class="toc-backref" href="#toc-entry-2">Installation</a></h2>
401409
<p>To install this module, you need to:</p>
402410
<ul class="simple">
403411
<li>Install <a class="reference external" href="http://lxml.de/">lxml</a> in Odoo’s <tt class="docutils literal">$PYTHONPATH</tt>.</li>
@@ -409,11 +417,11 @@ <h2><a class="toc-backref" href="#toc-entry-1">Installation</a></h2>
409417
on it.</p>
410418
</div>
411419
<div class="section" id="usage">
412-
<h2><a class="toc-backref" href="#toc-entry-2">Usage</a></h2>
420+
<h2><a class="toc-backref" href="#toc-entry-3">Usage</a></h2>
413421
<p>This module is intended as a base engine for other modules to use it, so
414422
no direct result if you are a user.</p>
415423
<div class="section" id="if-you-are-a-developer">
416-
<h3><a class="toc-backref" href="#toc-entry-3">If you are a developer</a></h3>
424+
<h3><a class="toc-backref" href="#toc-entry-4">If you are a developer</a></h3>
417425
<p>To learn from an example, just check the <a class="reference external" href="https://github.com/OCA/reporting-engine/blob/13.0/report_xml/demo/demo_report.xml">demo
418426
report</a>
419427
on GitHub for the model <tt class="docutils literal">res.company</tt> or check it in interface from
@@ -452,26 +460,29 @@ <h3><a class="toc-backref" href="#toc-entry-3">If you are a developer</a></h3>
452460
</div>
453461
</div>
454462
<div class="section" id="bug-tracker">
455-
<h2><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h2>
463+
<h2><a class="toc-backref" href="#toc-entry-5">Bug Tracker</a></h2>
456464
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/reporting-engine/issues">GitHub Issues</a>.
457465
In case of trouble, please check there if your issue has already been reported.
458466
If you spotted it first, help us to smash it by providing a detailed and welcomed
459-
<a class="reference external" href="https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_xml%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
467+
<a class="reference external" href="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**">feedback</a>.</p>
460468
<p>Do not contact contributors directly about support or help with technical issues.</p>
461469
</div>
462470
<div class="section" id="credits">
463-
<h2><a class="toc-backref" href="#toc-entry-5">Credits</a></h2>
471+
<h2><a class="toc-backref" href="#toc-entry-6">Credits</a></h2>
464472
<div class="section" id="authors">
465-
<h3><a class="toc-backref" href="#toc-entry-6">Authors</a></h3>
473+
<h3><a class="toc-backref" href="#toc-entry-7">Authors</a></h3>
466474
<ul class="simple">
467475
<li>Tecnativa</li>
468476
<li>Avoin.Systems</li>
469477
</ul>
470478
</div>
471479
<div class="section" id="contributors">
472-
<h3><a class="toc-backref" href="#toc-entry-7">Contributors</a></h3>
480+
<h3><a class="toc-backref" href="#toc-entry-8">Contributors</a></h3>
473481
<ul class="simple">
474-
<li>Enric Tobella &lt;<a class="reference external" href="mailto:etobella&#64;creublanca.es">etobella&#64;creublanca.es</a>&gt;</li>
482+
<li><a class="reference external" href="https://www.dixmit.com">Dixmit</a><ul>
483+
<li>Enric Tobella</li>
484+
</ul>
485+
</li>
475486
<li><a class="reference external" href="https://www.tecnativa.com">Tecnativa</a>:<ul>
476487
<li>Jairo Llopis</li>
477488
</ul>
@@ -484,21 +495,21 @@ <h3><a class="toc-backref" href="#toc-entry-7">Contributors</a></h3>
484495
</ul>
485496
</div>
486497
<div class="section" id="other-credits">
487-
<h3><a class="toc-backref" href="#toc-entry-8">Other credits</a></h3>
498+
<h3><a class="toc-backref" href="#toc-entry-9">Other credits</a></h3>
488499
<ul class="simple">
489500
<li>Icon taken from <a class="reference external" href="http://commons.wikimedia.org/wiki/File:Text-xml.svg">http://commons.wikimedia.org/wiki/File:Text-xml.svg</a></li>
490501
</ul>
491502
</div>
492503
<div class="section" id="maintainers">
493-
<h3><a class="toc-backref" href="#toc-entry-9">Maintainers</a></h3>
504+
<h3><a class="toc-backref" href="#toc-entry-10">Maintainers</a></h3>
494505
<p>This module is maintained by the OCA.</p>
495506
<a class="reference external image-reference" href="https://odoo-community.org">
496507
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
497508
</a>
498509
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
499510
mission is to support the collaborative development of Odoo features and
500511
promote its widespread use.</p>
501-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/18.0/report_xml">OCA/reporting-engine</a> project on GitHub.</p>
512+
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/19.0/report_xml">OCA/reporting-engine</a> project on GitHub.</p>
502513
<p>You are welcome to contribute. To learn how please visit <a class="reference external" href="https://odoo-community.org/page/Contribute">https://odoo-community.org/page/Contribute</a>.</p>
503514
</div>
504515
</div>

report_xml/tests/test_report_xml.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,31 @@
77

88
from odoo import http
99
from odoo.tests import common
10+
from odoo.tools import convert_file
1011

1112

1213
class TestXmlReport(common.HttpCase):
14+
@classmethod
15+
def setUpClass(cls):
16+
result = super().setUpClass()
17+
convert_file(
18+
cls.env,
19+
module="report_xml",
20+
filename="demo/report.xml",
21+
idref={},
22+
mode="init",
23+
noupdate=True,
24+
)
25+
convert_file(
26+
cls.env,
27+
module="report_xml",
28+
filename="demo/demo_report.xml",
29+
idref={},
30+
mode="init",
31+
noupdate=True,
32+
)
33+
return result
34+
1335
def test_xml(self):
1436
report_object = self.env["ir.actions.report"]
1537
report_name = "report_xml.demo_report_xml_view"

0 commit comments

Comments
 (0)