Skip to content

Commit 6a908e8

Browse files
committed
[MIG] report_xml: Migration to 18.0
1 parent 545de7a commit 6a908e8

File tree

5 files changed

+40
-38
lines changed

5 files changed

+40
-38
lines changed

report_xml/README.rst

+23-23
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ XML Reports
1717
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
1818
:alt: License: AGPL-3
1919
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github
20-
:target: https://github.com/OCA/reporting-engine/tree/17.0/report_xml
20+
:target: https://github.com/OCA/reporting-engine/tree/18.0/report_xml
2121
:alt: OCA/reporting-engine
2222
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
23-
:target: https://translation.odoo-community.org/projects/reporting-engine-17-0/reporting-engine-17-0-report_xml
23+
:target: https://translation.odoo-community.org/projects/reporting-engine-18-0/reporting-engine-18-0-report_xml
2424
:alt: Translate me on Weblate
2525
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
26-
:target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=17.0
26+
:target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=18.0
2727
:alt: Try me on Runboat
2828

2929
|badge1| |badge2| |badge3| |badge4| |badge5|
@@ -42,9 +42,9 @@ Installation
4242

4343
To install this module, you need to:
4444

45-
- Install `lxml <http://lxml.de/>`__ in Odoo's ``$PYTHONPATH``.
46-
- Install the repository
47-
`reporting-engine <https://github.com/OCA/reporting-engine>`__.
45+
- Install `lxml <http://lxml.de/>`__ in Odoo's ``$PYTHONPATH``.
46+
- Install the repository
47+
`reporting-engine <https://github.com/OCA/reporting-engine>`__.
4848

4949
But this module does nothing for the end user by itself, so if you have
5050
it installed it's probably because there is another module that depends
@@ -66,12 +66,12 @@ companies views.
6666

6767
To develop with this module, you need to:
6868

69-
- Create a module.
70-
- Make it depend on this one.
71-
- Follow `instructions to create
72-
reports <https://www.odoo.com/documentation/13.0/reference/reports.html>`__
73-
having in mind that the ``report_type`` field in your
74-
``ir.actions.report`` record must be ``qweb-xml``.
69+
- Create a module.
70+
- Make it depend on this one.
71+
- Follow `instructions to create
72+
reports <https://www.odoo.com/documentation/13.0/reference/reports.html>`__
73+
having in mind that the ``report_type`` field in your
74+
``ir.actions.report`` record must be ``qweb-xml``.
7575

7676
In case you want to create a `custom
7777
report <https://www.odoo.com/documentation/13.0/reference/reports.html#custom-reports>`__,
@@ -96,16 +96,16 @@ your XML report online as a web page.
9696

9797
For further information, please visit:
9898

99-
- https://www.odoo.com/forum/help-1
100-
- https://github.com/OCA/reporting-engine
99+
- https://www.odoo.com/forum/help-1
100+
- https://github.com/OCA/reporting-engine
101101

102102
Bug Tracker
103103
===========
104104

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

110110
Do not contact contributors directly about support or help with technical issues.
111111

@@ -121,22 +121,22 @@ Authors
121121
Contributors
122122
------------
123123

124-
- Enric Tobella <etobella@creublanca.es>
124+
- Enric Tobella <etobella@creublanca.es>
125125

126-
- `Tecnativa <https://www.tecnativa.com>`__:
126+
- `Tecnativa <https://www.tecnativa.com>`__:
127127

128-
- Jairo Llopis
128+
- Jairo Llopis
129129

130-
- `Avoin.Systems <https://avoin.systems/>`__:
130+
- `Avoin.Systems <https://avoin.systems/>`__:
131131

132-
- Tatiana Deribina
132+
- Tatiana Deribina
133133

134-
- Iván Antón <ozono@ozonomultimedia.com>
134+
- Iván Antón <ozono@ozonomultimedia.com>
135135

136136
Other credits
137137
-------------
138138

139-
- Icon taken from http://commons.wikimedia.org/wiki/File:Text-xml.svg
139+
- Icon taken from http://commons.wikimedia.org/wiki/File:Text-xml.svg
140140

141141
Maintainers
142142
-----------
@@ -151,6 +151,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
151151
mission is to support the collaborative development of Odoo features and
152152
promote its widespread use.
153153

154-
This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/17.0/report_xml>`_ project on GitHub.
154+
This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/18.0/report_xml>`_ project on GitHub.
155155

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

report_xml/__manifest__.py

+1-1
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": "17.0.1.0.0",
5+
"version": "18.0.1.0.0",
66
"category": "Reporting",
77
"website": "https://github.com/OCA/reporting-engine",
88
"development_status": "Production/Stable",

report_xml/demo/report.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<odoo>
3-
<record id="demo_xml_report" model="ir.actions.report">
3+
<record id="demo_xml_report" model="ir.actions.report">
44
<field name="name">Demo xml report</field>
55
<field name="model">res.company</field>
66
<field name="report_type">qweb-xml</field>

report_xml/static/description/index.html

+10-7
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88

99
/*
1010
:Author: David Goodger (goodger@python.org)
11-
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
11+
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
1212
:Copyright: This stylesheet has been placed in the public domain.
1313
1414
Default cascading style sheet for the HTML output of Docutils.
15+
Despite the name, some widely supported CSS2 features are used.
1516
1617
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
1718
customize this style sheet.
@@ -274,7 +275,7 @@
274275
margin-left: 2em ;
275276
margin-right: 2em }
276277

277-
pre.code .ln { color: grey; } /* line numbers */
278+
pre.code .ln { color: gray; } /* line numbers */
278279
pre.code, code { background-color: #eeeeee }
279280
pre.code .comment, code .comment { color: #5C6576 }
280281
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
@@ -300,7 +301,7 @@
300301
span.pre {
301302
white-space: pre }
302303

303-
span.problematic {
304+
span.problematic, pre.problematic {
304305
color: red }
305306

306307
span.section-subtitle {
@@ -368,7 +369,7 @@ <h1 class="title">XML Reports</h1>
368369
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
369370
!! source digest: sha256:f5a881c0eade552010cfe051f392fb1c7a5d474081f114d52a1f2a21d851096f
370371
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
371-
<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/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/reporting-engine/tree/17.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-17-0/reporting-engine-17-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=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
372+
<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/licence-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>
372373
<p>This module was written to extend the functionality of the reporting
373374
engine to support XML reports and allow modules to generate them by code
374375
or by QWeb templates.</p>
@@ -450,7 +451,7 @@ <h1><a class="toc-backref" href="#toc-entry-4">Bug Tracker</a></h1>
450451
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/reporting-engine/issues">GitHub Issues</a>.
451452
In case of trouble, please check there if your issue has already been reported.
452453
If you spotted it first, help us to smash it by providing a detailed and welcomed
453-
<a class="reference external" href="https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_xml%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
454+
<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>
454455
<p>Do not contact contributors directly about support or help with technical issues.</p>
455456
</div>
456457
<div class="section" id="credits">
@@ -486,11 +487,13 @@ <h2><a class="toc-backref" href="#toc-entry-8">Other credits</a></h2>
486487
<div class="section" id="maintainers">
487488
<h2><a class="toc-backref" href="#toc-entry-9">Maintainers</a></h2>
488489
<p>This module is maintained by the OCA.</p>
489-
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
490+
<a class="reference external image-reference" href="https://odoo-community.org">
491+
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
492+
</a>
490493
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
491494
mission is to support the collaborative development of Odoo features and
492495
promote its widespread use.</p>
493-
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/17.0/report_xml">OCA/reporting-engine</a> project on GitHub.</p>
496+
<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>
494497
<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>
495498
</div>
496499
</div>

report_xml/static/src/js/report/action_manager_report.esm.js

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
/** @odoo-module **/
2-
31
import {download} from "@web/core/network/download";
42
import {registry} from "@web/core/registry";
3+
import {user} from "@web/core/user";
54

6-
function getReportUrl({report_name, context, data}, env) {
5+
function getReportUrl({report_name, context, data}) {
76
// Rough copy of action_service.js _getReportUrl method.
87
let url = `/report/xml/${report_name}`;
98
const actionContext = context || {};
@@ -15,14 +14,14 @@ function getReportUrl({report_name, context, data}, env) {
1514
if (actionContext.active_ids) {
1615
url += `/${actionContext.active_ids.join(",")}`;
1716
}
18-
const userContext = encodeURIComponent(JSON.stringify(env.services.user.context));
17+
const userContext = encodeURIComponent(JSON.stringify(user.context));
1918
return `${url}?context=${userContext}`;
2019
}
2120
async function triggerDownload(action, {onClose}, env) {
2221
// Rough copy of action_service.js _triggerDownload method.
2322
env.services.ui.block();
24-
const data = JSON.stringify([getReportUrl(action, env), action.report_type]);
25-
const context = JSON.stringify(env.services.user.context);
23+
const data = JSON.stringify([getReportUrl(action), action.report_type]);
24+
const context = JSON.stringify(user.context);
2625
try {
2726
await download({url: "/report/download", data: {data, context}});
2827
} finally {

0 commit comments

Comments
 (0)