Skip to content

Commit d6283a1

Browse files
committed
Merge PR #16 into 18.0
Signed-off-by ValentinVinagre
2 parents 87ab195 + b5f24a8 commit d6283a1

17 files changed

Lines changed: 762 additions & 0 deletions

File tree

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
===================================
2+
Account Financial Reports Block PDF
3+
===================================
4+
5+
..
6+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
7+
!! This file is generated by oca-gen-addon-readme !!
8+
!! changes will be overwritten. !!
9+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
10+
!! source digest: sha256:242dd12a53539a8cec4ec373c14c65cb762d10e1f1d5bde4844c6c5019536419
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-sygel--technology%2Fsy--account--financial--reporting-lightgray.png?logo=github
20+
:target: https://github.com/sygel-technology/sy-account-financial-reporting/tree/18.0/account_financial_report_block_pdf
21+
:alt: sygel-technology/sy-account-financial-reporting
22+
23+
|badge1| |badge2| |badge3|
24+
25+
This module allows to block the generation of financial reports in PDF
26+
format. It is possible to configure the list of financial reports that
27+
have to be blocked.
28+
29+
**Table of contents**
30+
31+
.. contents::
32+
:local:
33+
34+
Configuration
35+
=============
36+
37+
To configure the list of financial reports that cannot be printed in PDF
38+
you need to:
39+
40+
- Go to Settings > Technical > System Parameters.
41+
42+
- Find or create a system parameter called
43+
"forbidden.pdf.financial.reports".
44+
45+
- Introduce the technical name of the wizard generator models that need
46+
to be blocked separated by commas. The link between the financial
47+
reports in the module account_financial_report and the technical name
48+
of their wizards is as follows:
49+
50+
- General Ledger: general.ledger.report.wizard
51+
- Journal Ledger: journal.ledger.report.wizard
52+
- Trial Balance: trial.balance.report.wizard
53+
- Open Items: open.items.report.wizard
54+
- Aged Partner Balance: aged.partner.balance.report.wizard
55+
- VAT Report: vat.report.wizard
56+
57+
For instance, if the PDF generation of the General Ledger and Trial
58+
Balance reports have to be blocked, the
59+
"forbidden.pdf.financial.reports" system parameter should contain the
60+
value "general.ledger.report.wizard,trial.balance.report.wizard" (with
61+
no quotes).
62+
63+
Keep in mind that all the PDF reports are blocked by default when this
64+
module is installed.
65+
66+
If a new report that inherits the abstract class
67+
account_financial_report_abstract_wizard is developed, its PDF report
68+
can also be blocked by adding the name of its own wizard in the
69+
"forbidden.pdf.financial.reports" system parameter list.
70+
71+
Usage
72+
=====
73+
74+
When a user tries to generate the PDF file of a financial report whose
75+
PDF file have been blocked, an error message appears.
76+
77+
Bug Tracker
78+
===========
79+
80+
Bugs are tracked on `GitHub Issues <https://github.com/sygel-technology/sy-account-financial-reporting/issues>`_.
81+
In case of trouble, please check there if your issue has already been reported.
82+
If you spotted it first, help us to smash it by providing a detailed and welcomed
83+
`feedback <https://github.com/sygel-technology/sy-account-financial-reporting/issues/new?body=module:%20account_financial_report_block_pdf%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.
84+
85+
Do not contact contributors directly about support or help with technical issues.
86+
87+
Credits
88+
=======
89+
90+
Authors
91+
-------
92+
93+
* Sygel
94+
95+
Contributors
96+
------------
97+
98+
- `Sygel <https://www.sygel.es>`__:
99+
100+
- Manuel Regidor
101+
- Valentín Vinagre
102+
103+
Maintainers
104+
-----------
105+
106+
This module is part of the `sygel-technology/sy-account-financial-reporting <https://github.com/sygel-technology/sy-account-financial-reporting/tree/18.0/account_financial_report_block_pdf>`_ project on GitHub.
107+
108+
You are welcome to contribute.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright 2024 Manuel Regidor <manuel.regidor@sygel.es>
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3+
4+
from . import wizard
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Copyright 2024 Manuel Regidor <manuel.regidor@sygel.es>
2+
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
3+
{
4+
"name": "Account Financial Reports Block PDF",
5+
"version": "18.0.1.0.0",
6+
"category": "Reporting",
7+
"summary": "Block the generation of financial PDF reports",
8+
"author": "Sygel," "Odoo Community Association (OCA)",
9+
"website": "https://github.com/sygel-technology/sy-account-financial-reporting",
10+
"depends": ["account_financial_report"],
11+
"data": ["data/ir_config_param.xml"],
12+
"installable": True,
13+
"license": "AGPL-3",
14+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?xml version="1.0" ?>
2+
<odoo noupdate="1">
3+
<record id="forbidden_pdf_financial_reports" model="ir.config_parameter">
4+
<field name="key">forbidden.pdf.financial.reports</field>
5+
<field
6+
name="value"
7+
>general.ledger.report.wizard,journal.ledger.report.wizard,trial.balance.report.wizard,open.items.report.wizard,aged.partner.balance.report.wizard,vat.report.wizard</field>
8+
</record>
9+
</odoo>
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * account_financial_report_block_pdf
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 15.0+e\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"POT-Creation-Date: 2024-06-12 07:52+0000\n"
10+
"PO-Revision-Date: 2024-06-12 09:56+0200\n"
11+
"Last-Translator: \n"
12+
"Language-Team: \n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: 8bit\n"
16+
"Language: ca\n"
17+
"X-Generator: Poedit 2.3\n"
18+
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
19+
20+
#. module: account_financial_report_block_pdf
21+
#: model:ir.model,name:account_financial_report_block_pdf.model_account_financial_report_abstract_wizard
22+
msgid "Abstract Wizard"
23+
msgstr "Assistent d'extracte"
24+
25+
#. module: account_financial_report_block_pdf
26+
#: code:addons/account_financial_report_block_pdf/wizard/abstract_wizard.py:0
27+
#, python-format
28+
msgid ""
29+
"{} PDF reports are not permitted. You can generate it in XLSX format and "
30+
"print it as a PDF file"
31+
msgstr ""
32+
"No es permet extraure l'informe {} en PDF. El pots generar en format "
33+
"XLSX i imprimir-lo com a fitxer PDF"
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Translation of Odoo Server.
2+
# This file contains the translation of the following modules:
3+
# * account_financial_report_block_pdf
4+
#
5+
msgid ""
6+
msgstr ""
7+
"Project-Id-Version: Odoo Server 15.0+e\n"
8+
"Report-Msgid-Bugs-To: \n"
9+
"POT-Creation-Date: 2024-06-12 07:57+0000\n"
10+
"PO-Revision-Date: 2024-06-12 09:57+0200\n"
11+
"Last-Translator: \n"
12+
"Language-Team: \n"
13+
"MIME-Version: 1.0\n"
14+
"Content-Type: text/plain; charset=UTF-8\n"
15+
"Content-Transfer-Encoding: 8bit\n"
16+
"Plural-Forms: \n"
17+
"Language: es\n"
18+
"X-Generator: Poedit 2.3\n"
19+
20+
#. module: account_financial_report_block_pdf
21+
#: model:ir.model,name:account_financial_report_block_pdf.model_account_financial_report_abstract_wizard
22+
msgid "Abstract Wizard"
23+
msgstr "Asistente de Extracto"
24+
25+
#. module: account_financial_report_block_pdf
26+
#: code:addons/account_financial_report_block_pdf/wizard/abstract_wizard.py:0
27+
#, python-format
28+
msgid ""
29+
"{} PDF reports are not permitted. You can generate it in XLSX format and "
30+
"print it as a PDF file"
31+
msgstr ""
32+
"No se permite generar el informe {} en PDF. Puedes generarlo en formato "
33+
"XLSX e imprimirlo como fichero PDF"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["whool"]
3+
build-backend = "whool.buildapi"
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
To configure the list of financial reports that cannot be printed in PDF you need to:
2+
3+
* Go to Settings > Technical > System Parameters.
4+
* Find or create a system parameter called "forbidden.pdf.financial.reports".
5+
* Introduce the technical name of the wizard generator models that need to be blocked
6+
separated by commas. The link between the financial reports in the module
7+
account_financial_report and the technical name of their wizards is as follows:
8+
9+
* General Ledger: general.ledger.report.wizard
10+
* Journal Ledger: journal.ledger.report.wizard
11+
* Trial Balance: trial.balance.report.wizard
12+
* Open Items: open.items.report.wizard
13+
* Aged Partner Balance: aged.partner.balance.report.wizard
14+
* VAT Report: vat.report.wizard
15+
16+
For instance, if the PDF generation of the General Ledger and Trial Balance reports have
17+
to be blocked, the "forbidden.pdf.financial.reports" system parameter should contain the
18+
value "general.ledger.report.wizard,trial.balance.report.wizard" (with no quotes).
19+
20+
Keep in mind that all the PDF reports are blocked by default when this module is
21+
installed.
22+
23+
If a new report that inherits the abstract class account_financial_report_abstract_wizard
24+
is developed, its PDF report can also be blocked by adding the name of its own wizard
25+
in the "forbidden.pdf.financial.reports" system parameter list.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
- [Sygel](https://www.sygel.es):
2+
- Manuel Regidor
3+
- Valentín Vinagre
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
This module allows to block the generation of financial reports in PDF format.
2+
It is possible to configure the list of financial reports that have to be blocked.

0 commit comments

Comments
 (0)