Skip to content

Commit 4d0af46

Browse files
committed
Merge PR #816 into 17.0
Signed-off-by dreispt
2 parents 954e150 + e85d934 commit 4d0af46

20 files changed

+1011
-0
lines changed

report_qweb_parameter/README.rst

+98
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
=====================
2+
Report QWeb Parameter
3+
=====================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:6e50557d8d49cab3485b6aa968d1dbc2a8d55f1fd8cdc34b3b269db65edf9693
11+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
12+
13+
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
14+
:target: https://odoo-community.org/page/development-status
15+
:alt: Beta
16+
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
17+
:target: http://www.gnu.org/licenses/agpl-3.0-standalone.html
18+
:alt: License: AGPL-3
19+
.. |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_qweb_parameter
21+
:alt: OCA/reporting-engine
22+
.. |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_qweb_parameter
24+
:alt: Translate me on Weblate
25+
.. |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
27+
:alt: Try me on Runboat
28+
29+
|badge1| |badge2| |badge3| |badge4| |badge5|
30+
31+
This module allows you to add new parameters on QWeb reports. Currently,
32+
we have defined a field maximum on a report and a validation of maximal
33+
and minimal size. It is useful on xml reports in order to validate
34+
length. XML are sometimes XSD dependant and we must validate its format.
35+
For example, in spanish facturae
36+
(http://www.facturae.gob.es/Paginas/Index.aspx), where length and format
37+
must be validated in several fields in order to send an invoice.
38+
39+
**Table of contents**
40+
41+
.. contents::
42+
:local:
43+
44+
Usage
45+
=====
46+
47+
1. Add a t-length attribute on report templates fields that will
48+
truncate the field
49+
2. Add a t-minlength attribute on report template fields that will check
50+
the min length
51+
3. Add a t-maxlength attribute on report template fields that will check
52+
the max length
53+
54+
Bug Tracker
55+
===========
56+
57+
Bugs are tracked on `GitHub Issues <https://github.com/OCA/reporting-engine/issues>`_.
58+
In case of trouble, please check there if your issue has already been reported.
59+
If you spotted it first, help us to smash it by providing a detailed and welcomed
60+
`feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_qweb_parameter%0Aversion:%2017.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
61+
62+
Do not contact contributors directly about support or help with technical issues.
63+
64+
Credits
65+
=======
66+
67+
Authors
68+
-------
69+
70+
* Creu Blanca
71+
72+
Contributors
73+
------------
74+
75+
- Enric Tobella <[email protected]>
76+
77+
- `Tecnativa <https://www.tecnativa.com>`__:
78+
79+
- Carlos Roca
80+
81+
- Iván Antón <[email protected]>
82+
83+
Maintainers
84+
-----------
85+
86+
This module is maintained by the OCA.
87+
88+
.. image:: https://odoo-community.org/logo.png
89+
:alt: Odoo Community Association
90+
:target: https://odoo-community.org
91+
92+
OCA, or the Odoo Community Association, is a nonprofit organization whose
93+
mission is to support the collaborative development of Odoo features and
94+
promote its widespread use.
95+
96+
This module is part of the `OCA/reporting-engine <https://github.com/OCA/reporting-engine/tree/17.0/report_qweb_parameter>`_ project on GitHub.
97+
98+
You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

report_qweb_parameter/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
2+
3+
from . import models

report_qweb_parameter/__manifest__.py

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Copyright 2017 Creu Blanca
2+
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
3+
4+
{
5+
"name": "Report QWeb Parameter",
6+
"version": "17.0.1.0.0",
7+
"license": "AGPL-3",
8+
"summary": """
9+
Add new parameters for qweb templates in order to reduce field length
10+
and check minimal length
11+
""",
12+
"author": "Creu Blanca, Odoo Community Association (OCA)",
13+
"website": "https://github.com/OCA/reporting-engine",
14+
"category": "Technical Settings",
15+
"depends": ["web"],
16+
"demo": ["demo/test_report_field_length.xml"],
17+
"installable": True,
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<odoo>
3+
<record id="test_report_length_report_id" model="ir.actions.report">
4+
<field name="name">Length Report</field>
5+
<field name="model">res.company</field>
6+
<field name="report_type">qweb-html</field>
7+
<field name="report_name">report_qweb_parameter.test_report_length</field>
8+
</record>
9+
<template id="test_report_length">
10+
<data>
11+
<li
12+
name="esc_length"
13+
t-minlength="10"
14+
t-length="10"
15+
t-esc="docs[0].street"
16+
t-if="docs[0].street"
17+
/>
18+
<li
19+
name="esc_maxlength"
20+
t-maxlength="10"
21+
t-esc="docs[0].website"
22+
t-if="docs[0].website"
23+
/>
24+
<li
25+
name="raw_length"
26+
t-minlength="10"
27+
t-length="10"
28+
t-raw="docs[0].vat"
29+
t-if="docs[0].vat"
30+
/>
31+
<li
32+
name="raw_maxlength"
33+
t-maxlength="10"
34+
t-raw="docs[0].company_registry"
35+
t-if="docs[0].company_registry"
36+
/>
37+
<li
38+
name="raw_length"
39+
t-minlength="10"
40+
t-length="10"
41+
t-out="docs[0].vat"
42+
t-if="docs[0].vat"
43+
/>
44+
<li
45+
name="raw_maxlength"
46+
t-maxlength="10"
47+
t-out="docs[0].company_registry"
48+
t-if="docs[0].company_registry"
49+
/>
50+
</data>
51+
</template>
52+
</odoo>

report_qweb_parameter/i18n/ca.po

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * report_qweb_parameter
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 15.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"PO-Revision-Date: 2022-06-15 18:05+0000\n"
10+
"Last-Translator: jabelchi <[email protected]>\n"
11+
"Language-Team: none\n"
12+
"Language: ca\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
17+
"X-Generator: Weblate 4.3.2\n"
18+
19+
#. module: report_qweb_parameter
20+
#: model:ir.actions.report,name:report_qweb_parameter.test_report_length_report_id
21+
msgid "Length Report"
22+
msgstr "Longitud de l'informe"
23+
24+
#. module: report_qweb_parameter
25+
#. odoo-python
26+
#: code:addons/report_qweb_parameter/models/ir_qweb.py:0
27+
#, python-format
28+
msgid "Length cannot be less than %s"
29+
msgstr "La longitut no pot ser menor que %s"
30+
31+
#. module: report_qweb_parameter
32+
#. odoo-python
33+
#: code:addons/report_qweb_parameter/models/ir_qweb.py:0
34+
#, python-format
35+
msgid "Length cannot be more than %s"
36+
msgstr "La llargada no pot ser més gran que %s"
37+
38+
#. module: report_qweb_parameter
39+
#: model:ir.model,name:report_qweb_parameter.model_ir_qweb
40+
msgid "Qweb"
41+
msgstr "Qweb"

report_qweb_parameter/i18n/es.po

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * report_qweb_parameter
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 12.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"POT-Creation-Date: \n"
10+
"PO-Revision-Date: \n"
11+
"Last-Translator: Carlos <[email protected]>\n"
12+
"Language-Team: \n"
13+
"Language: es\n"
14+
"MIME-Version: 1.0\n"
15+
"Content-Type: text/plain; charset=UTF-8\n"
16+
"Content-Transfer-Encoding: 8bit\n"
17+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
18+
"X-Generator: Poedit 2.0.6\n"
19+
20+
#. module: report_qweb_parameter
21+
#: model:ir.actions.report,name:report_qweb_parameter.test_report_length_report_id
22+
msgid "Length Report"
23+
msgstr "Longitud del informe"
24+
25+
#. module: report_qweb_parameter
26+
#. odoo-python
27+
#: code:addons/report_qweb_parameter/models/ir_qweb.py:0
28+
#, python-format
29+
msgid "Length cannot be less than %s"
30+
msgstr "La longitud no puede ser menor a %s"
31+
32+
#. module: report_qweb_parameter
33+
#. odoo-python
34+
#: code:addons/report_qweb_parameter/models/ir_qweb.py:0
35+
#, python-format
36+
msgid "Length cannot be more than %s"
37+
msgstr "La longitud no puede ser mayor a %s"
38+
39+
#. module: report_qweb_parameter
40+
#: model:ir.model,name:report_qweb_parameter.model_ir_qweb
41+
msgid "Qweb"
42+
msgstr "Qweb"

report_qweb_parameter/i18n/fr.po

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * report_qweb_parameter
4+
#
5+
# Translators:
6+
# Nicolas JEUDY <[email protected]>, 2018
7+
msgid ""
8+
msgstr ""
9+
"Project-Id-Version: Odoo Server 11.0\n"
10+
"Report-Msgid-Bugs-To: \n"
11+
"POT-Creation-Date: 2018-01-05 17:53+0000\n"
12+
"PO-Revision-Date: 2018-01-05 17:53+0000\n"
13+
"Last-Translator: Nicolas JEUDY <[email protected]>, 2018\n"
14+
"Language-Team: French (https://www.transifex.com/oca/teams/23907/fr/)\n"
15+
"Language: fr\n"
16+
"MIME-Version: 1.0\n"
17+
"Content-Type: text/plain; charset=UTF-8\n"
18+
"Content-Transfer-Encoding: \n"
19+
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
20+
21+
#. module: report_qweb_parameter
22+
#: model:ir.actions.report,name:report_qweb_parameter.test_report_length_report_id
23+
msgid "Length Report"
24+
msgstr "Longueur du rapport "
25+
26+
#. module: report_qweb_parameter
27+
#. odoo-python
28+
#: code:addons/report_qweb_parameter/models/ir_qweb.py:0
29+
#, python-format
30+
msgid "Length cannot be less than %s"
31+
msgstr "La longueur du rapport ne peut pas être inférieure à %s"
32+
33+
#. module: report_qweb_parameter
34+
#. odoo-python
35+
#: code:addons/report_qweb_parameter/models/ir_qweb.py:0
36+
#, python-format
37+
msgid "Length cannot be more than %s"
38+
msgstr "La longueur du rapport ne peut pas être supérieure à %s"
39+
40+
#. module: report_qweb_parameter
41+
#: model:ir.model,name:report_qweb_parameter.model_ir_qweb
42+
msgid "Qweb"
43+
msgstr ""
44+
45+
#~ msgid "ir.qweb"
46+
#~ msgstr "ir.qweb"

report_qweb_parameter/i18n/it.po

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * report_qweb_parameter
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 13.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"PO-Revision-Date: 2020-11-20 23:36+0000\n"
10+
"Last-Translator: Alessandro Fiorino <[email protected]>\n"
11+
"Language-Team: none\n"
12+
"Language: it\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
17+
"X-Generator: Weblate 3.10\n"
18+
19+
#. module: report_qweb_parameter
20+
#: model:ir.actions.report,name:report_qweb_parameter.test_report_length_report_id
21+
msgid "Length Report"
22+
msgstr "Lunghezza Report"
23+
24+
#. module: report_qweb_parameter
25+
#. odoo-python
26+
#: code:addons/report_qweb_parameter/models/ir_qweb.py:0
27+
#, python-format
28+
msgid "Length cannot be less than %s"
29+
msgstr "La lunghezza non può essere meno di %s"
30+
31+
#. module: report_qweb_parameter
32+
#. odoo-python
33+
#: code:addons/report_qweb_parameter/models/ir_qweb.py:0
34+
#, python-format
35+
msgid "Length cannot be more than %s"
36+
msgstr "La lunghezza non può essere più di %s"
37+
38+
#. module: report_qweb_parameter
39+
#: model:ir.model,name:report_qweb_parameter.model_ir_qweb
40+
msgid "Qweb"
41+
msgstr "Qweb"

report_qweb_parameter/i18n/pt.po

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * report_qweb_parameter
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 12.0\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"PO-Revision-Date: 2019-08-14 13:44+0000\n"
10+
"Last-Translator: Pedro Castro Silva <[email protected]>\n"
11+
"Language-Team: none\n"
12+
"Language: pt\n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: \n"
16+
"Plural-Forms: nplurals=2; plural=n > 1;\n"
17+
"X-Generator: Weblate 3.7.1\n"
18+
19+
#. module: report_qweb_parameter
20+
#: model:ir.actions.report,name:report_qweb_parameter.test_report_length_report_id
21+
msgid "Length Report"
22+
msgstr "Relatório de Comprimento"
23+
24+
#. module: report_qweb_parameter
25+
#. odoo-python
26+
#: code:addons/report_qweb_parameter/models/ir_qweb.py:0
27+
#, python-format
28+
msgid "Length cannot be less than %s"
29+
msgstr "Comprimento não pode ser superior a %s"
30+
31+
#. module: report_qweb_parameter
32+
#. odoo-python
33+
#: code:addons/report_qweb_parameter/models/ir_qweb.py:0
34+
#, python-format
35+
msgid "Length cannot be more than %s"
36+
msgstr "Comprimento não pode ser inferior a %s"
37+
38+
#. module: report_qweb_parameter
39+
#: model:ir.model,name:report_qweb_parameter.model_ir_qweb
40+
msgid "Qweb"
41+
msgstr ""

0 commit comments

Comments
 (0)