.. image:: https://odoo-community.org/readme-banner-image
   :target: https://odoo-community.org/get-involved?utm_source=readme
   :alt: Odoo Community Association

===============================
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/license-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_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-16-0/knowledge-16-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=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 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:%2016.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/16.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.
