commit a13dfce5c6936f93d94fa7d995e4ac256e556441 Author: Suherdy Yacob Date: Thu Jan 15 09:37:47 2026 +0700 first commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f2b0a61 --- /dev/null +++ b/.gitignore @@ -0,0 +1,16 @@ +# Python +__pycache__/ +*.py[cod] +*$py.class +*.so +.Python + +# Odoo +*.pot +*.po + +# Editor +.vscode/ +.idea/ +*.swp +*~ diff --git a/README.md b/README.md new file mode 100644 index 0000000..ee77c11 --- /dev/null +++ b/README.md @@ -0,0 +1,21 @@ +# Quality Button Restriction + +## Overview +This module restricts the visibility of the "Quality Checks" button and access to quality features to only users who are explicitly assigned the "Quality User" group. + +## Features +- **Decouples Quality User Rights**: Removes the default behavior where "Inventory Users" and "Manufacturing Users" automatically inherit "Quality User" rights. +- **Strict Access Control**: Ensures that only users with the explicitly assigned "Quality / User" or "Quality / Administrator" role can initiate quality checks or view quality alerts. + +## Configuration +To grant a user access to Quality features: +1. Go to **Settings > Users & Companies > Users**. +2. Select the user. +3. In the **Human Resources** / **Other** tab (depending on Odoo version), locate the **Quality** field. +4. Set the value to **User** or **Administrator**. + +## Dependencies +- `quality` +- `stock` +- `mrp` +- `quality_mrp` diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/__manifest__.py b/__manifest__.py new file mode 100644 index 0000000..fcea9e4 --- /dev/null +++ b/__manifest__.py @@ -0,0 +1,23 @@ +{ + 'name': 'Quality Button Restriction', + 'version': '18.0.1.0.0', + 'category': 'Quality', + 'summary': 'Restrict Quality Checks button to Quality Users only', + 'description': """ + This module decouples 'Quality User' rights from 'Inventory User' and 'Manufacturing User' roles. + + By default in Odoo, Inventory and Manufacturing users automatically inherit Quality User rights, + which makes the "Quality Checks" button visible to them. + + This module removes this inheritance, so users must be explicitly assigned "Quality User" rights + to see the "Quality Checks" button and access other quality features. + """, + 'author': 'Suherdy Yacob', + 'depends': ['quality', 'stock', 'mrp', 'quality_mrp'], + 'data': [ + 'security/quality_security.xml', + ], + 'license': 'LGPL-3', + 'installable': True, + 'auto_install': False, +} diff --git a/security/quality_security.xml b/security/quality_security.xml new file mode 100644 index 0000000..42a7f4a --- /dev/null +++ b/security/quality_security.xml @@ -0,0 +1,12 @@ + + + + + + + + + + + +