diff --git a/mgmtsystem_audit_document_category/README.rst b/mgmtsystem_audit_document_category/README.rst new file mode 100644 index 000000000..6f02b8125 --- /dev/null +++ b/mgmtsystem_audit_document_category/README.rst @@ -0,0 +1,85 @@ +.. image:: https://odoo-community.org/readme-banner-image + :target: https://odoo-community.org/get-involved?utm_source=readme + :alt: Odoo Community Association + +========================================= +Management System Audit Document Category +========================================= + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:85cb7188dddf75ab122ae0902170e54b8e0c7caa627bdda88368bcbeb71e79cd + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |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-NuoBiT%2Fodoo--addons-lightgray.png?logo=github + :target: https://github.com/NuoBiT/odoo-addons/tree/14.0/mgmtsystem_audit_document_category + :alt: NuoBiT/odoo-addons + +|badge1| |badge2| |badge3| + +This module makes the management system audit **Procedure** selection robust +against the document category name and language. + +The OCA ``mgmtsystem_audit`` module filters the *Procedure* field of an audit +verification line by matching hardcoded English category names (``Procedure``, +``Environmental Aspect``, ``Quality Manual``, ``Environment Manual``). That match +relies on the category title, so it breaks as soon as the categories are renamed +or created in another language (for example in Spanish), leaving the field empty +even though procedures exist. + +This module replaces that name based match with the explicit *Management System +Category Type* classification provided by ``mgmtsystem_document_category``: + +* The verification line *Procedure* field, both in the form and in the search + filter, offers every document stored directly under a classified category, + resolved from that stable classification instead of from the category name. + +As a result the selection keeps working regardless of how the categories are +named or in which language they are used. + +**Table of contents** + +.. contents:: + :local: + +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 +~~~~~~~ + +* NuoBiT Solutions +* S.L. + +Contributors +~~~~~~~~~~~~ + +* `NuoBiT `__: + + * Deniz Gallo + +Maintainers +~~~~~~~~~~~ + +This module is part of the `NuoBiT/odoo-addons `_ project on GitHub. + +You are welcome to contribute. diff --git a/mgmtsystem_audit_document_category/__init__.py b/mgmtsystem_audit_document_category/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/mgmtsystem_audit_document_category/__manifest__.py b/mgmtsystem_audit_document_category/__manifest__.py new file mode 100644 index 000000000..78ab42384 --- /dev/null +++ b/mgmtsystem_audit_document_category/__manifest__.py @@ -0,0 +1,20 @@ +# Copyright 2026 NuoBiT Solutions SL - Deniz Gallo +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). + +{ + "name": "Management System Audit Document Category", + "summary": "Filter audit verification procedures by document category type " + "instead of by category name", + "version": "14.0.1.0.0", + "category": "Management System", + "author": "NuoBiT Solutions, S.L.", + "website": "https://github.com/nuobit/odoo-addons", + "license": "AGPL-3", + "depends": [ + "mgmtsystem_audit", + "mgmtsystem_document_category", + ], + "data": [ + "views/mgmtsystem_audit.xml", + ], +} diff --git a/mgmtsystem_audit_document_category/readme/CONTRIBUTORS.rst b/mgmtsystem_audit_document_category/readme/CONTRIBUTORS.rst new file mode 100644 index 000000000..1ecb7fa04 --- /dev/null +++ b/mgmtsystem_audit_document_category/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* `NuoBiT `__: + + * Deniz Gallo diff --git a/mgmtsystem_audit_document_category/readme/DESCRIPTION.rst b/mgmtsystem_audit_document_category/readme/DESCRIPTION.rst new file mode 100644 index 000000000..1fb328fb5 --- /dev/null +++ b/mgmtsystem_audit_document_category/readme/DESCRIPTION.rst @@ -0,0 +1,19 @@ +This module makes the management system audit **Procedure** selection robust +against the document category name and language. + +The OCA ``mgmtsystem_audit`` module filters the *Procedure* field of an audit +verification line by matching hardcoded English category names (``Procedure``, +``Environmental Aspect``, ``Quality Manual``, ``Environment Manual``). That match +relies on the category title, so it breaks as soon as the categories are renamed +or created in another language (for example in Spanish), leaving the field empty +even though procedures exist. + +This module replaces that name based match with the explicit *Management System +Category Type* classification provided by ``mgmtsystem_document_category``: + +* The verification line *Procedure* field, both in the form and in the search + filter, offers every document stored directly under a classified category, + resolved from that stable classification instead of from the category name. + +As a result the selection keeps working regardless of how the categories are +named or in which language they are used. diff --git a/mgmtsystem_audit_document_category/static/description/icon.png b/mgmtsystem_audit_document_category/static/description/icon.png new file mode 100644 index 000000000..1cd641e79 Binary files /dev/null and b/mgmtsystem_audit_document_category/static/description/icon.png differ diff --git a/mgmtsystem_audit_document_category/static/description/index.html b/mgmtsystem_audit_document_category/static/description/index.html new file mode 100644 index 000000000..722b50d4a --- /dev/null +++ b/mgmtsystem_audit_document_category/static/description/index.html @@ -0,0 +1,442 @@ + + + + + +README.rst + + + +
+ + + +Odoo Community Association + +
+

Management System Audit Document Category

+ +

Beta License: AGPL-3 NuoBiT/odoo-addons

+

This module makes the management system audit Procedure selection robust +against the document category name and language.

+

The OCA mgmtsystem_audit module filters the Procedure field of an audit +verification line by matching hardcoded English category names (Procedure, +Environmental Aspect, Quality Manual, Environment Manual). That match +relies on the category title, so it breaks as soon as the categories are renamed +or created in another language (for example in Spanish), leaving the field empty +even though procedures exist.

+

This module replaces that name based match with the explicit Management System +Category Type classification provided by mgmtsystem_document_category:

+
    +
  • The verification line Procedure field, both in the form and in the search +filter, offers every document stored directly under a classified category, +resolved from that stable classification instead of from the category name.
  • +
+

As a result the selection keeps working regardless of how the categories are +named or in which language they are used.

+

Table of contents

+ +
+

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

+
    +
  • NuoBiT Solutions
  • +
  • S.L.
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is part of the NuoBiT/odoo-addons project on GitHub.

+

You are welcome to contribute.

+
+
+
+
+ + diff --git a/mgmtsystem_audit_document_category/views/mgmtsystem_audit.xml b/mgmtsystem_audit_document_category/views/mgmtsystem_audit.xml new file mode 100644 index 000000000..8abe51eb8 --- /dev/null +++ b/mgmtsystem_audit_document_category/views/mgmtsystem_audit.xml @@ -0,0 +1,40 @@ + + + + + + mgmtsystem.verification.line.filter - procedure filter + mgmtsystem.verification.line + + + + [('parent_id.mgmtsystem_category_type', '!=', False)] + + + + + + mgmtsystem.verification.line.form - procedure filter + mgmtsystem.verification.line + + + + [('parent_id.mgmtsystem_category_type', '!=', False)] + + + + + diff --git a/setup/mgmtsystem_audit_document_category/odoo/addons/mgmtsystem_audit_document_category b/setup/mgmtsystem_audit_document_category/odoo/addons/mgmtsystem_audit_document_category new file mode 120000 index 000000000..60549e2f7 --- /dev/null +++ b/setup/mgmtsystem_audit_document_category/odoo/addons/mgmtsystem_audit_document_category @@ -0,0 +1 @@ +../../../../mgmtsystem_audit_document_category \ No newline at end of file diff --git a/setup/mgmtsystem_audit_document_category/setup.py b/setup/mgmtsystem_audit_document_category/setup.py new file mode 100644 index 000000000..28c57bb64 --- /dev/null +++ b/setup/mgmtsystem_audit_document_category/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/test-requirements.txt b/test-requirements.txt index 301a2b08e..913802da4 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -2,3 +2,4 @@ openupgradelib@git+https://github.com/OCA/openupgradelib.git@master pyveloedi@git+https://github.com/nuobit/pyveloedi3.git@master odoo14-addon-oxigen_stock_alternate_lot@git+https://github.com/oxigensalud/odoo-addons.git@14.0#subdirectory=setup/oxigen_stock_alternate_lot odoo14-addon-pricelist_massive_update@git+https://github.com/oxigensalud/odoo-community-addons.git@14.0#subdirectory=setup/pricelist_massive_update +odoo14-addon-mgmtsystem_document_category@git+https://github.com/nuobit/odoo-addons.git@refs/pull/925/head#subdirectory=setup/mgmtsystem_document_category