mirror of
https://github.com/OCA/reporting-engine.git
synced 2025-02-16 16:30:38 +02:00
[MIG] report_qweb_element_page_visibility: Migration to 15.0
This commit is contained in:
@@ -14,13 +14,13 @@ Report Qweb Element Page Visibility
|
||||
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
|
||||
:alt: License: AGPL-3
|
||||
.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github
|
||||
:target: https://github.com/OCA/reporting-engine/tree/14.0/report_qweb_element_page_visibility
|
||||
:target: https://github.com/OCA/reporting-engine/tree/15.0/report_qweb_element_page_visibility
|
||||
:alt: OCA/reporting-engine
|
||||
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
|
||||
:target: https://translation.odoo-community.org/projects/reporting-engine-14-0/reporting-engine-14-0-report_qweb_element_page_visibility
|
||||
:target: https://translation.odoo-community.org/projects/reporting-engine-15-0/reporting-engine-15-0-report_qweb_element_page_visibility
|
||||
:alt: Translate me on Weblate
|
||||
.. |badge5| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png
|
||||
:target: https://runbot.odoo-community.org/runbot/143/14.0
|
||||
:target: https://runbot.odoo-community.org/runbot/143/15.0
|
||||
:alt: Try me on Runbot
|
||||
|
||||
|badge1| |badge2| |badge3| |badge4| |badge5|
|
||||
@@ -65,7 +65,7 @@ Bug Tracker
|
||||
Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/issues>`_.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
||||
`feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_qweb_element_page_visibility%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
`feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_qweb_element_page_visibility%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
|
||||
|
||||
Do not contact contributors directly about support or help with technical issues.
|
||||
|
||||
@@ -87,6 +87,13 @@ Contributors
|
||||
* Saran Limpajitkutaporn <saranl@ecosoft.co.th>
|
||||
* Pimolnat Suntian <pimolnats@ecosoft.co.th>
|
||||
* Tharathip Chaweewongphan <tharathipc@ecosoft.co.th>
|
||||
* `Trobz <https://trobz.com>`_:
|
||||
* Hai Lang <hailn@trobz.com>
|
||||
|
||||
Other credits
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
The migration of this module from 14.0 to 14.0 was financially supported by Camptocamp
|
||||
|
||||
Maintainers
|
||||
~~~~~~~~~~~
|
||||
@@ -101,6 +108,6 @@ OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.
|
||||
|
||||
This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/14.0/report_qweb_element_page_visibility>`_ project on GitHub.
|
||||
This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/15.0/report_qweb_element_page_visibility>`_ project on GitHub.
|
||||
|
||||
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
{
|
||||
"name": "Report Qweb Element Page Visibility",
|
||||
"version": "14.0.1.0.0",
|
||||
"version": "15.0.1.0.0",
|
||||
"author": "Agile Business Group, Odoo Community Association (OCA)",
|
||||
"category": "Tools",
|
||||
"website": "https://github.com/OCA/reporting-engine",
|
||||
|
||||
@@ -5,3 +5,5 @@
|
||||
* Saran Limpajitkutaporn <saranl@ecosoft.co.th>
|
||||
* Pimolnat Suntian <pimolnats@ecosoft.co.th>
|
||||
* Tharathip Chaweewongphan <tharathipc@ecosoft.co.th>
|
||||
* `Trobz <https://trobz.com>`_:
|
||||
* Hai Lang <hailn@trobz.com>
|
||||
|
||||
1
report_qweb_element_page_visibility/readme/CREDITS.rst
Normal file
1
report_qweb_element_page_visibility/readme/CREDITS.rst
Normal file
@@ -0,0 +1 @@
|
||||
The migration of this module from 14.0 to 14.0 was financially supported by Camptocamp
|
||||
@@ -3,7 +3,7 @@
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="generator" content="Docutils 0.15.1: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils: http://docutils.sourceforge.net/" />
|
||||
<title>Report Qweb Element Page Visibility</title>
|
||||
<style type="text/css">
|
||||
|
||||
@@ -367,7 +367,7 @@ ul.auto-toc {
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" 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" href="https://github.com/OCA/reporting-engine/tree/14.0/report_qweb_element_page_visibility"><img alt="OCA/reporting-engine" src="https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/reporting-engine-14-0/reporting-engine-14-0-report_qweb_element_page_visibility"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/143/14.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p><a class="reference external" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external" 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" href="https://github.com/OCA/reporting-engine/tree/15.0/report_qweb_element_page_visibility"><img alt="OCA/reporting-engine" src="https://img.shields.io/badge/github-OCA%2Freporting--engine-lightgray.png?logo=github" /></a> <a class="reference external" href="https://translation.odoo-community.org/projects/reporting-engine-15-0/reporting-engine-15-0-report_qweb_element_page_visibility"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external" href="https://runbot.odoo-community.org/runbot/143/15.0"><img alt="Try me on Runbot" src="https://img.shields.io/badge/runbot-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module allows you to use 4 classes in QWEB reports:</p>
|
||||
<ul class="simple">
|
||||
<li>not-first-page: shows element in every page but first</li>
|
||||
@@ -383,7 +383,8 @@ ul.auto-toc {
|
||||
<li><a class="reference internal" href="#credits" id="id3">Credits</a><ul>
|
||||
<li><a class="reference internal" href="#authors" id="id4">Authors</a></li>
|
||||
<li><a class="reference internal" href="#contributors" id="id5">Contributors</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="id6">Maintainers</a></li>
|
||||
<li><a class="reference internal" href="#other-credits" id="id6">Other credits</a></li>
|
||||
<li><a class="reference internal" href="#maintainers" id="id7">Maintainers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -414,7 +415,7 @@ with order’s name in every page but last, add this code to external_layout_hea
|
||||
<p>Bugs are tracked on <a class="reference external" href="https://github.com/OCA/reporting-engine/issues">GitHub Issues</a>.
|
||||
In case of trouble, please check there if your issue has already been reported.
|
||||
If you spotted it first, help us smashing it by providing a detailed and welcomed
|
||||
<a class="reference external" href="https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_qweb_element_page_visibility%0Aversion:%2014.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<a class="reference external" href="https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_qweb_element_page_visibility%0Aversion:%2015.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**">feedback</a>.</p>
|
||||
<p>Do not contact contributors directly about support or help with technical issues.</p>
|
||||
</div>
|
||||
<div class="section" id="credits">
|
||||
@@ -435,16 +436,28 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
|
||||
<li>Saran Limpajitkutaporn <<a class="reference external" href="mailto:saranl@ecosoft.co.th">saranl@ecosoft.co.th</a>></li>
|
||||
<li>Pimolnat Suntian <<a class="reference external" href="mailto:pimolnats@ecosoft.co.th">pimolnats@ecosoft.co.th</a>></li>
|
||||
<li>Tharathip Chaweewongphan <<a class="reference external" href="mailto:tharathipc@ecosoft.co.th">tharathipc@ecosoft.co.th</a>></li>
|
||||
<li><dl class="first docutils">
|
||||
<dt><a class="reference external" href="https://trobz.com">Trobz</a>:</dt>
|
||||
<dd><ul class="first last">
|
||||
<li>Hai Lang <<a class="reference external" href="mailto:hailn@trobz.com">hailn@trobz.com</a>></li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="other-credits">
|
||||
<h2><a class="toc-backref" href="#id6">Other credits</a></h2>
|
||||
<p>The migration of this module from 14.0 to 14.0 was financially supported by Camptocamp</p>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#id6">Maintainers</a></h2>
|
||||
<h2><a class="toc-backref" href="#id7">Maintainers</a></h2>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/14.0/report_qweb_element_page_visibility">OCA/reporting-engine</a> project on GitHub.</p>
|
||||
<p>This module is part of the <a class="reference external" href="https://github.com/OCA/reporting-engine/tree/15.0/report_qweb_element_page_visibility">OCA/reporting-engine</a> project on GitHub.</p>
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,57 +1,57 @@
|
||||
<odoo>
|
||||
<template id="minimal_layout" inherit_id="web.minimal_layout">
|
||||
<xpath expr="//t[@t-if='subst_needed']" position="replace">
|
||||
<t t-if="subst is True">
|
||||
<script>
|
||||
function subst() {
|
||||
var vars = {};
|
||||
var x = document.location.search.substring(1).split('&');
|
||||
for (var i in x) {
|
||||
var z = x[i].split('=', 2);
|
||||
vars[z[0]] = unescape(z[1]);
|
||||
}
|
||||
var fromPage = document.getElementsByClassName('page');
|
||||
for(var j = 0; j<fromPage.length; j++)
|
||||
fromPage[j].textContent = vars['sitepage'];
|
||||
var toPage = document.getElementsByClassName('topage');
|
||||
for(var j = 0; j<toPage.length; j++)
|
||||
toPage[j].textContent = vars['sitepages'];
|
||||
|
||||
var index = vars['webpage'].split('.', 4)[3]
|
||||
var header = document.getElementById('minimal_layout_report_headers');
|
||||
if(header !== null){
|
||||
var companyHeader = header.children[index];
|
||||
header.textContent = '';
|
||||
header.appendChild(companyHeader);
|
||||
}
|
||||
var footer = document.getElementById('minimal_layout_report_footers');
|
||||
if(footer !== null){
|
||||
var companyFooter = footer.children[index];
|
||||
footer.textContent = '';
|
||||
footer.appendChild(companyFooter);
|
||||
}
|
||||
var operations = {
|
||||
'not-first-page': function (elt) {
|
||||
elt.style.visibility = (vars.sitepage === vars.frompage) ? "hidden" : "visible";
|
||||
},
|
||||
'not-last-page': function (elt) {
|
||||
elt.style.visibility = (vars.sitepage === vars.sitepages) ? "hidden" : "visible";
|
||||
},
|
||||
'first-page': function (elt) {
|
||||
elt.style.visibility = (vars.sitepage === vars.frompage) ? "visible" : "hidden";
|
||||
},
|
||||
'last-page': function (elt) {
|
||||
elt.style.visibility = (vars.sitepage === vars.sitepages) ? "visible" : "hidden";
|
||||
},
|
||||
};
|
||||
for (var klass in operations) {
|
||||
var y = document.getElementsByClassName(klass);
|
||||
for (var j=0; j<y.length; ++j)
|
||||
operations[klass](y[j]);
|
||||
}
|
||||
<template id="minimal_layout" inherit_id="web.minimal_layout" priority="100">
|
||||
<script t-if="subst" position="replace">
|
||||
<script t-if="subst">
|
||||
function subst() {
|
||||
var vars = {};
|
||||
var x = document.location.search.substring(1).split('&');
|
||||
for (var i in x) {
|
||||
var z = x[i].split('=', 2);
|
||||
vars[z[0]] = unescape(z[1]);
|
||||
}
|
||||
</script>
|
||||
</t>
|
||||
</xpath>
|
||||
var x = ['sitepage', 'sitepages', 'section', 'subsection', 'subsubsection'];
|
||||
var z = {'sitepage': 'page', 'sitepages': 'topage'};
|
||||
for (var i in x) {
|
||||
var y = document.getElementsByClassName(z[x[i]] || x[i])
|
||||
for (var j=0; j<y.length; ++j)
|
||||
y[j].textContent = vars[x[i]];
|
||||
}
|
||||
|
||||
var index = vars['webpage'].split('.', 4)[3];
|
||||
var header = document.getElementById('minimal_layout_report_headers');
|
||||
if(header){
|
||||
var companyHeader = header.children[index];
|
||||
header.textContent = '';
|
||||
header.appendChild(companyHeader);
|
||||
}
|
||||
var footer = document.getElementById('minimal_layout_report_footers');
|
||||
if(footer){
|
||||
var companyFooter = footer.children[index];
|
||||
footer.textContent = '';
|
||||
footer.appendChild(companyFooter);
|
||||
}
|
||||
|
||||
var operations = {
|
||||
'not-first-page': function (elt) {
|
||||
elt.style.visibility = (vars.sitepage == vars.frompage) ? "hidden" : "visible";
|
||||
},
|
||||
'not-last-page': function (elt) {
|
||||
elt.style.visibility = (vars.sitepage == vars.sitepages) ? "hidden" : "visible";
|
||||
},
|
||||
'first-page': function (elt) {
|
||||
elt.style.visibility = (vars.sitepage == vars.frompage) ? "visible" : "hidden";
|
||||
},
|
||||
'last-page': function (elt) {
|
||||
elt.style.visibility = (vars.sitepage == vars.sitepages) ? "visible" : "hidden";
|
||||
},
|
||||
};
|
||||
for (var klass in operations) {
|
||||
var y = document.getElementsByClassName(klass);
|
||||
for (var j=0; j<y.length; ++j)
|
||||
operations[klass](y[j]);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
</template>
|
||||
</odoo>
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
../../../../report_qweb_element_page_visibility
|
||||
6
setup/report_qweb_element_page_visibility/setup.py
Normal file
6
setup/report_qweb_element_page_visibility/setup.py
Normal file
@@ -0,0 +1,6 @@
|
||||
import setuptools
|
||||
|
||||
setuptools.setup(
|
||||
setup_requires=['setuptools-odoo'],
|
||||
odoo_addon=True,
|
||||
)
|
||||
Reference in New Issue
Block a user