first commit
This commit is contained in:
commit
a13dfce5c6
16
.gitignore
vendored
Normal file
16
.gitignore
vendored
Normal file
@ -0,0 +1,16 @@
|
||||
# Python
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
*.so
|
||||
.Python
|
||||
|
||||
# Odoo
|
||||
*.pot
|
||||
*.po
|
||||
|
||||
# Editor
|
||||
.vscode/
|
||||
.idea/
|
||||
*.swp
|
||||
*~
|
||||
21
README.md
Normal file
21
README.md
Normal file
@ -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`
|
||||
0
__init__.py
Normal file
0
__init__.py
Normal file
23
__manifest__.py
Normal file
23
__manifest__.py
Normal file
@ -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,
|
||||
}
|
||||
12
security/quality_security.xml
Normal file
12
security/quality_security.xml
Normal file
@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<!-- Decouple Quality User from Stock User -->
|
||||
<record id="stock.group_stock_user" model="res.groups">
|
||||
<field name="implied_ids" eval="[(3, ref('quality.group_quality_user'))]"/>
|
||||
</record>
|
||||
|
||||
<!-- Decouple Quality User from MRP User -->
|
||||
<record id="mrp.group_mrp_user" model="res.groups">
|
||||
<field name="implied_ids" eval="[(3, ref('quality.group_quality_user'))]"/>
|
||||
</record>
|
||||
</odoo>
|
||||
Loading…
Reference in New Issue
Block a user