Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[14.0] backport report_qweb_pdf_cover #972

Open
wants to merge 8 commits into
base: 14.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 102 additions & 0 deletions report_qweb_pdf_cover/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
=====================
Report QWeb PDF Cover
=====================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:1287ee62d703ed048f33bb706f289cf01e5c99bead22b8b612d69e88071a4d67
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
:target: https://odoo-community.org/page/development-status
:alt: Beta
.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png
: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_pdf_cover
: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_pdf_cover
:alt: Translate me on Weblate
.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png
:target: https://runboat.odoo-community.org/builds?repo=OCA/reporting-engine&target_branch=14.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

This module allows for front and back covers to be added to the generated PDF
reports. They can be added as a separate page, at the beginning or the end of
the report, but they can also overlap the first and last page of the actual
report, respectively.


**Table of contents**

.. contents::
:local:

Usage
=====

To add a cover to a report, you need to access to the report's configuration,
more specifically to the `Advanced Properties` tab. There, you will find two
checkboxes, one for the front cover and another for the back cover.
They both work the same, so let's focus on the front cover with an example.

* You must check the `Use Front Cover` checkbox to enable the front cover. You
will see that a new checkbox and a PDF file widget appear.

* If you want the front cover to overlap with the first page of the PDF report,
you should also check the `Overlap Front Cover` checkbox. Leave it unchecked
if you don't want the front cover to overlap with the first page.

* The last step would be to upload the PDF file that will be used as the front
cover. You can do this by clicking on the PDF file widget and selecting the
file.

* Important! The file must be a PDF file, and it should have only one page. If
it has more pages, only the first one will be used.

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 to smash it by providing a detailed and welcomed
`feedback <https://github.com/OCA/reporting-engine/issues/new?body=module:%20report_qweb_pdf_cover%0Aversion:%2014.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.

Credits
=======

Authors
~~~~~~~

* ForgeFlow

Contributors
~~~~~~~~~~~~

* Laura Cazorla <laura.cazorla@forgeflow.com>

Maintainers
~~~~~~~~~~~

This module is maintained by the OCA.

.. image:: https://odoo-community.org/logo.png
:alt: Odoo Community Association
:target: https://odoo-community.org

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_pdf_cover>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
4 changes: 4 additions & 0 deletions report_qweb_pdf_cover/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright 2024 ForgeFlow S.L. (https://www.forgeflow.com)
# Part of ForgeFlow. See LICENSE file for full copyright and licensing details.

from . import models
16 changes: 16 additions & 0 deletions report_qweb_pdf_cover/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2024 ForgeFlow S.L. (https://www.forgeflow.com)
# Part of ForgeFlow. See LICENSE file for full copyright and licensing details.

{
"name": "Report QWeb PDF Cover",
"summary": "Add front and back covers to your QWeb PDF reports",
"author": "ForgeFlow, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/reporting-engine",
"category": "Reporting",
"version": "14.0.1.0.0",
"license": "AGPL-3",
"depends": ["web"],
"data": ["views/ir_actions_views.xml"],
"installable": True,
"application": False,
}
158 changes: 158 additions & 0 deletions report_qweb_pdf_cover/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * report_qweb_pdf_cover
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0+e\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-08-27 08:09+0000\n"
"PO-Revision-Date: 2024-08-27 08:09+0000\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: report_qweb_pdf_cover
#: model:ir.model.fields,field_description:report_qweb_pdf_cover.field_ir_actions_report__back_cover_pdf
msgid "Back Cover PDF"
msgstr "Contraportada PDF"

#. module: report_qweb_pdf_cover
#. odoo-python
#: code:addons/report_qweb_pdf_cover/models/ir_actions_report.py:0
#, python-format
msgid "Failed to load back cover: %s"
msgstr "Error al cargar la contraportada: %s"

#. module: report_qweb_pdf_cover
#. odoo-python
#: code:addons/report_qweb_pdf_cover/models/ir_actions_report.py:0
#, python-format
msgid "Failed to load front cover: %s"
msgstr "Error al cargar la portada: %s"

#. module: report_qweb_pdf_cover
#: model:ir.model.fields,field_description:report_qweb_pdf_cover.field_ir_actions_report__front_cover_pdf
msgid "Front Cover PDF"
msgstr "Portada PDF"

#. module: report_qweb_pdf_cover
#. odoo-python
#: code:addons/report_qweb_pdf_cover/models/ir_actions_report.py:0
#, python-format
msgid "No usable back cover found."
msgstr "No se encontró ninguna contraportada usable."

#. module: report_qweb_pdf_cover
#. odoo-python
#: code:addons/report_qweb_pdf_cover/models/ir_actions_report.py:0
#, python-format
msgid "No usable front cover found."
msgstr "No se encontró ninguna portada usable."

#. module: report_qweb_pdf_cover
#: model:ir.model.fields,field_description:report_qweb_pdf_cover.field_ir_actions_report__back_cover_overlap
msgid "Overlap Back Cover"
msgstr "Superponer Contraportada"

#. module: report_qweb_pdf_cover
#: model:ir.model.fields,field_description:report_qweb_pdf_cover.field_ir_actions_report__front_cover_overlap
msgid "Overlap Front Cover"
msgstr "Superponer Portada"

#. module: report_qweb_pdf_cover
#: model:ir.model,name:report_qweb_pdf_cover.model_ir_actions_report
msgid "Report Action"
msgstr "Acción de Informe"

#. module: report_qweb_pdf_cover
#: model:ir.model.fields,help:report_qweb_pdf_cover.field_ir_actions_report__back_cover_pdf
msgid "Upload an PDF file to use as a back cover on this report."
msgstr "Suba un archivo PDF para usar como contraportada en este informe."

#. module: report_qweb_pdf_cover
#: model:ir.model.fields,help:report_qweb_pdf_cover.field_ir_actions_report__front_cover_pdf
msgid "Upload an PDF file to use as a front cover on this report."
msgstr "Suba un archivo PDF para usar como portada en este informe."

#. module: report_qweb_pdf_cover
#: model:ir.model.fields,field_description:report_qweb_pdf_cover.field_ir_actions_report__use_back_cover
msgid "Use Back Cover"
msgstr "Usar Contraportada"

#. module: report_qweb_pdf_cover
#: model:ir.model.fields,field_description:report_qweb_pdf_cover.field_ir_actions_report__use_front_cover
msgid "Use Front Cover"
msgstr "Usar Portada"

#. module: report_qweb_pdf_cover
#: model:ir.model.fields,help:report_qweb_pdf_cover.field_ir_actions_report__use_back_cover
msgid "Use a back cover when rendering the PDF report."
msgstr "Usar una contraportada al renderizar el informe PDF."

#. module: report_qweb_pdf_cover
#: model:ir.model.fields,help:report_qweb_pdf_cover.field_ir_actions_report__use_front_cover
msgid "Use a front cover when rendering the PDF report."
msgstr "Usar una portada al renderizar el informe PDF."

#. module: report_qweb_pdf_cover
#: model:ir.model.fields,help:report_qweb_pdf_cover.field_ir_actions_report__back_cover_overlap
msgid ""
"When set, the back cover of the report will overlap with the contents of the "
"last page of the report. This is useful to include some information of the "
"report in the back cover."
msgstr ""
"Cuando se establece, la contraportada del informe se superpondrá con el "
"contenido de la última página del informe. Esto es útil para incluir alguna "
"información del informe en la contraportada."

#. module: report_qweb_pdf_cover
#: model:ir.model.fields,help:report_qweb_pdf_cover.field_ir_actions_report__front_cover_overlap
msgid ""
"When set, the front cover of the report will overlap with the contents of "
"the first page of the report. This is useful to include some information of "
"the report in the front cover."
msgstr ""
"Cuando se establece, la portada del informe se superpondrá con el contenido "
"de la primera página del informe. Esto es útil para incluir alguna "
"información del informe en la portada."

#. module: report_qweb_pdf_cover
#. odoo-python
#: code:addons/report_qweb_pdf_cover/models/ir_actions_report.py:0
#, python-format
msgid ""
"Your back cover PDF contains more than one page, all but the first one will "
"be ignored."
msgstr ""
"Su contraportada PDF contiene más de una página, todas menos la primera se "
"ignorarán."

#. module: report_qweb_pdf_cover
#. odoo-python
#: code:addons/report_qweb_pdf_cover/models/ir_actions_report.py:0
#, python-format
msgid "Your back cover PDF does not contain any pages."
msgstr "Su contraportada PDF no contiene ninguna página."

#. module: report_qweb_pdf_cover
#. odoo-python
#: code:addons/report_qweb_pdf_cover/models/ir_actions_report.py:0
#, python-format
msgid ""
"Your front cover PDF contains more than one page, all but the first one will "
"be ignored."
msgstr ""
"Su portada PDF contiene más de una página, todas menos la primera se "
"ignorarán."

#. module: report_qweb_pdf_cover
#. odoo-python
#: code:addons/report_qweb_pdf_cover/models/ir_actions_report.py:0
#, python-format
msgid "Your front cover PDF does not contain any pages."
msgstr "Su portada PDF no contiene ninguna página"
Loading
Loading