diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..559269c --- /dev/null +++ b/.gitignore @@ -0,0 +1,16 @@ +# Python +__pycache__/ +*.py[cod] +*$py.class + +# Odoo +*.pot +*.po + +# IDE +.vscode/ +.idea/ + +# System +.DS_Store +Thumbs.db diff --git a/README.md b/README.md new file mode 100644 index 0000000..f358e39 --- /dev/null +++ b/README.md @@ -0,0 +1,25 @@ +# MRP User Product Restriction + +This Odoo 17 module allows you to restrict the products a user can manufacture. + +## Features + +- **Manufacturing Restrictions Tab**: Adds a new tab in the User form to define allowed products. +- **Strict Validation**: Users can only create Manufacturing Orders for products listed in their "Allowed Products Manufacture" field. +- **Empty List Protection**: If the "Allowed Products Manufacture" list is empty, the user cannot create ANY Manufacturing Orders. +- **Smart Filtering**: The product dropdown in the Manufacturing Order form is automatically filtered to show only allowed products. + +## Configuration + +1. Go to **Settings** > **Users & Companies** > **Users**. +2. Select a user. +3. Go to the **Manufacturing Restrictions** tab. +4. Add products to the **Allowed Products Manufacture** field. + - If left empty, the user will be blocked from creating MOs. + +## Usage + +1. Log in as the configured user. +2. Navigate to **Manufacturing** > **Operations** > **Manufacturing Orders**. +3. Create a new Manufacturing Order. +4. The **Product** dropdown will only show the allowed products.