From 62ebf2ba867f99f7daf2be104a60ea88983376d9 Mon Sep 17 00:00:00 2001 From: Juan Alberto Raja Date: Tue, 8 Jul 2025 12:25:48 +0200 Subject: [PATCH] [IMP] document_print_control: pre-commit autofixes --- document_print_control/README.rst | 102 ++++ .../static/description/index.html | 454 ++++++++++++++++++ .../odoo/addons/document_print_control | 1 + setup/document_print_control/setup.py | 6 + 4 files changed, 563 insertions(+) create mode 100644 document_print_control/README.rst create mode 100644 document_print_control/static/description/index.html create mode 120000 setup/document_print_control/odoo/addons/document_print_control create mode 100644 setup/document_print_control/setup.py diff --git a/document_print_control/README.rst b/document_print_control/README.rst new file mode 100644 index 00000000..ebfd6b47 --- /dev/null +++ b/document_print_control/README.rst @@ -0,0 +1,102 @@ +====================== +Document Print Control +====================== + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:c08c914a87dd77f1d5c07e7716f9f40c7341917cc62a95efe6c0035fce9a9eaf + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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/16.0/document_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-16-0/knowledge-16-0-document_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=16.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 can be printed by +configuring tags with a "printable" attribute. When a document page has +tags marked as non-printable, the print button will be hidden and the +printing functionality will be disabled for that document. + +**Table of contents** + +.. contents:: + :local: + +Usage +===== + +If you want to control the printing of document pages using tags: + +1. Go to Document Management, then to Configuration, and open Tags. +2. Create or edit existing tags and use the "Is Printable" checkbox to + control printing permissions. +3. Uncheck "Is Printable" for tags that should prevent document + printing. +4. Assign these tags to document pages - if any tag on a document page + is marked as non-printable, the entire document becomes + non-printable. +5. The print button will automatically hide for non-printable documents, + and printing functionality will be disabled. +6. All tags are printable by default to maintain backward compatibility. + +Bug Tracker +=========== + +Bugs are tracked on `GitHub 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 `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +------- + +* Sygel + +Contributors +------------ + + - `Sygel `__: + + .. + + - Juan Alberto Raja Martinez + - Valentín Vinagre Urteaga + +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 `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/document_print_control/static/description/index.html b/document_print_control/static/description/index.html new file mode 100644 index 00000000..f4a641ad --- /dev/null +++ b/document_print_control/static/description/index.html @@ -0,0 +1,454 @@ + + + + + +Document Print Control + + + +
+

Document Print Control

+ + +

Beta License: AGPL-3 OCA/knowledge Translate me on Weblate Try me on Runboat

+

This module adds print control functionality to document pages based on +tags. It allows users to control which document pages can be printed by +configuring tags with a “printable” attribute. When a document page has +tags marked as non-printable, the print button will be hidden and the +printing functionality will be disabled for that document.

+

Table of contents

+ +
+

Usage

+

If you want to control the printing of document pages using tags:

+
    +
  1. Go to Document Management, then to Configuration, and open Tags.
  2. +
  3. Create or edit existing tags and use the “Is Printable” checkbox to +control printing permissions.
  4. +
  5. Uncheck “Is Printable” for tags that should prevent document +printing.
  6. +
  7. Assign these tags to document pages - if any tag on a document page +is marked as non-printable, the entire document becomes +non-printable.
  8. +
  9. The print button will automatically hide for non-printable documents, +and printing functionality will be disabled.
  10. +
  11. All tags are printable by default to maintain backward compatibility.
  12. +
+
+
+

Bug Tracker

+

Bugs are tracked on GitHub 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.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • Sygel
  • +
+
+
+

Contributors

+
+ + +
+ +
+
+
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

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

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/setup/document_print_control/odoo/addons/document_print_control b/setup/document_print_control/odoo/addons/document_print_control new file mode 120000 index 00000000..7f34bcd9 --- /dev/null +++ b/setup/document_print_control/odoo/addons/document_print_control @@ -0,0 +1 @@ +../../../../document_print_control \ No newline at end of file diff --git a/setup/document_print_control/setup.py b/setup/document_print_control/setup.py new file mode 100644 index 00000000..28c57bb6 --- /dev/null +++ b/setup/document_print_control/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +)