Skip to content
Closed
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
108 changes: 108 additions & 0 deletions document_page_tag_print_control/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
===============================
Document Page Tag Print Control
===============================

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

.. |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%2Fknowledge-lightgray.png?logo=github
:target: https://github.com/OCA/knowledge/tree/18.0/document_page_tag_print_control
:alt: OCA/knowledge
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/knowledge-18-0/knowledge-18-0-document_page_tag_print_control
: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/knowledge&target_branch=18.0
:alt: Try me on Runboat

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

This module adds print control functionality to document pages based on
tags. It allows users to control which document pages cannot be printed
by configuring tags with a "Not Printable" attribute.

When a document page has one or more tags marked as not printable,
printing functionality will be disabled and a warning will be shown if
attempted.

Users with the "Manager" role in the "Document Knowledge" section (under
Settings > Users > Access Rights > Other) are exempt from these
restrictions and can print any document page regardless of its tags.

**Table of contents**

.. contents::
:local:

Usage
=====

To restrict the printing of document pages using tags:

1. Go to Document Management > Configuration > Tags.
2. Create or edit existing tags and use the "Not Printable" checkbox to
prevent printing.
3. Check "Not Printable" for tags that should block printing.
4. Assign these tags to document pages. If any tag on a page is marked
as not printable, the entire page will be blocked from printing.
5. If you attempt to print such pages, the system will raise a warning
and prevent the action.
6. All tags allow printing by default for compatibility.

Users with the **Manager** role in the "Document Knowledge" section
(Settings > Users > Access Rights > Other) are not affected by this
restriction. They can always print any document page.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/knowledge/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/knowledge/issues/new?body=module:%20document_page_tag_print_control%0Aversion:%2018.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
-------

* Sygel

Contributors
------------

- `Sygel <https://www.sygel.es>`__

- Juan Alberto Raja
- Valentín Vinagre

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/knowledge <https://github.com/OCA/knowledge/tree/18.0/document_page_tag_print_control>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions document_page_tag_print_control/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright 2025 Juan Alberto Raja<juan.raja@sygel.es>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
from . import models
20 changes: 20 additions & 0 deletions document_page_tag_print_control/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2025 Juan Alberto Raja <juan.raja@sygel.es>
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
{
"name": "Document Page Tag Print Control",
"summary": "Restricts document page printing based on assigned tags",
"version": "18.0.1.0.0",
"license": "AGPL-3",
"author": "Sygel, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/knowledge",
"category": "Knowledge",
"depends": [
"document_page_tag",
],
"data": [
"views/document_page_tag.xml",
],
"installable": True,
"application": False,
"auto_install": False,
}
77 changes: 77 additions & 0 deletions document_page_tag_print_control/i18n/ca_ES.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# Translation of Odoo Server.
# * document_page_tag_print_control
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: ca\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: document_page_tag_print_control
#: model:ir.model,name:document_page_tag_print_control.model_document_page_tag
msgid "A keyword for document pages"
msgstr ""

#. module: document_page_tag_print_control
#: model:ir.model,name:document_page_tag_print_control.model_document_page
msgid "Document Page"
msgstr ""

#. module: document_page_tag_print_control
#: model:ir.model,name:document_page_tag_print_control.model_report_document_page_report_documentpage
msgid "Document Page Report with Print Control"
msgstr ""

#. module: document_page_tag_print_control
#: model:ir.model.fields,help:document_page_tag_print_control.field_document_page_tag__is_not_printable
msgid "If checked, pages with this tag cannot be printed"
msgstr "Si està marcat, les pàgines amb aquesta etiqueta no es poden imprimir"

#. module: document_page_tag_print_control
#: model:ir.model.fields,help:document_page_tag_print_control.field_document_page__is_not_printable
msgid "Indicates if the document cannot be printed based on its tags"
msgstr ""
"Indica si el document no es pot imprimir basant-se en les seves etiquetes"

#. module: document_page_tag_print_control
#: model:ir.model.fields,field_description:document_page_tag_print_control.field_document_page__is_not_printable
#: model:ir.model.fields,field_description:document_page_tag_print_control.field_document_page_tag__is_not_printable
msgid "Is Not Printable"
msgstr "No és imprimible"

#. module: document_page_tag_print_control
#: model_terms:ir.ui.view,arch_db:document_page_tag_print_control.view_document_page_tag_search_extended
msgid "Non-Printable Tags"
msgstr "Etiquetes no imprimibles"

#. module: document_page_tag_print_control
#. odoo-python
#: code:addons/document_page_tag_print_control/models/report_document_page.py:0
#, fuzzy, python-format
msgid "None of the selected pages can be printed due to their tags."
msgstr ""
"Cap de les pàgines seleccionades es pot imprimir a causa de les seves "
"etiquetes."

#. module: document_page_tag_print_control
#: model_terms:ir.ui.view,arch_db:document_page_tag_print_control.view_document_page_tag_search_extended
msgid "Printable Tags"
msgstr "Etiquetes imprimibles"

#. module: document_page_tag_print_control
#. odoo-python
#: code:addons/document_page_tag_print_control/models/report_document_page.py:0
#, python-format
msgid "Some pages cannot be printed due to their tags:\n"
msgstr "Algunes pàgines no es poden imprimir a causa de les seves etiquetes:\n"

#~ msgid "Print"
#~ msgstr "Imprimir"
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Translation of Odoo Server.
# This file contains the translation of the following modules:
# * document_page_tag_print_control
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"Last-Translator: \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: document_page_tag_print_control
#: model:ir.model,name:document_page_tag_print_control.model_document_page_tag
msgid "A keyword for document pages"
msgstr ""

#. module: document_page_tag_print_control
#: model:ir.model,name:document_page_tag_print_control.model_document_page
msgid "Document Page"
msgstr ""

#. module: document_page_tag_print_control
#: model:ir.model,name:document_page_tag_print_control.model_report_document_page_report_documentpage
msgid "Document Page Report with Print Control"
msgstr ""

#. module: document_page_tag_print_control
#: model:ir.model.fields,help:document_page_tag_print_control.field_document_page_tag__is_not_printable
msgid "If checked, pages with this tag cannot be printed"
msgstr ""

#. module: document_page_tag_print_control
#: model:ir.model.fields,help:document_page_tag_print_control.field_document_page__is_not_printable
msgid "Indicates if the document cannot be printed based on its tags"
msgstr ""

#. module: document_page_tag_print_control
#: model:ir.model.fields,field_description:document_page_tag_print_control.field_document_page__is_not_printable
#: model:ir.model.fields,field_description:document_page_tag_print_control.field_document_page_tag__is_not_printable
msgid "Is Not Printable"
msgstr ""

#. module: document_page_tag_print_control
#: model_terms:ir.ui.view,arch_db:document_page_tag_print_control.view_document_page_tag_search_extended
msgid "Non-Printable Tags"
msgstr ""

#. module: document_page_tag_print_control
#. odoo-python
#: code:addons/document_page_tag_print_control/models/report_document_page.py:0
#, python-format
msgid "None of the selected pages can be printed due to their tags."
msgstr ""

#. module: document_page_tag_print_control
#: model_terms:ir.ui.view,arch_db:document_page_tag_print_control.view_document_page_tag_search_extended
msgid "Printable Tags"
msgstr ""

#. module: document_page_tag_print_control
#. odoo-python
#: code:addons/document_page_tag_print_control/models/report_document_page.py:0
#, python-format
msgid "Some pages cannot be printed due to their tags:\n"
msgstr ""
76 changes: 76 additions & 0 deletions document_page_tag_print_control/i18n/es.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Translation of Odoo Server.
# * document_page_tag_print_control
#
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server 16.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: \n"
"Plural-Forms: \n"

#. module: document_page_tag_print_control
#: model:ir.model,name:document_page_tag_print_control.model_document_page_tag
msgid "A keyword for document pages"
msgstr ""

#. module: document_page_tag_print_control
#: model:ir.model,name:document_page_tag_print_control.model_document_page
msgid "Document Page"
msgstr ""

#. module: document_page_tag_print_control
#: model:ir.model,name:document_page_tag_print_control.model_report_document_page_report_documentpage
msgid "Document Page Report with Print Control"
msgstr ""

#. module: document_page_tag_print_control
#: model:ir.model.fields,help:document_page_tag_print_control.field_document_page_tag__is_not_printable
msgid "If checked, pages with this tag cannot be printed"
msgstr "Si está marcado, las páginas con esta etiqueta no se pueden imprimir"

#. module: document_page_tag_print_control
#: model:ir.model.fields,help:document_page_tag_print_control.field_document_page__is_not_printable
msgid "Indicates if the document cannot be printed based on its tags"
msgstr "Indica si el documento no puede ser impreso basándose en sus etiquetas"

#. module: document_page_tag_print_control
#: model:ir.model.fields,field_description:document_page_tag_print_control.field_document_page__is_not_printable
#: model:ir.model.fields,field_description:document_page_tag_print_control.field_document_page_tag__is_not_printable
msgid "Is Not Printable"
msgstr "No es imprimible"

#. module: document_page_tag_print_control
#: model_terms:ir.ui.view,arch_db:document_page_tag_print_control.view_document_page_tag_search_extended
msgid "Non-Printable Tags"
msgstr "Etiquetas no imprimibles"

#. module: document_page_tag_print_control
#. odoo-python
#: code:addons/document_page_tag_print_control/models/report_document_page.py:0
#, fuzzy, python-format
msgid "None of the selected pages can be printed due to their tags."
msgstr ""
"Ninguna de las páginas seleccionadas se puede imprimir debido a sus "
"etiquetas."

#. module: document_page_tag_print_control
#: model_terms:ir.ui.view,arch_db:document_page_tag_print_control.view_document_page_tag_search_extended
msgid "Printable Tags"
msgstr "Etiquetas imprimibles"

#. module: document_page_tag_print_control
#. odoo-python
#: code:addons/document_page_tag_print_control/models/report_document_page.py:0
#, python-format
msgid "Some pages cannot be printed due to their tags:\n"
msgstr "Algunas páginas no se pueden imprimir debido a sus etiquetas:\n"

#~ msgid "Print"
#~ msgstr "Imprimir"
Loading
Loading