# mage-os/module-inventory-reservations-grid

> Add a grid with the list of inventory reservations.

`composer require mage-os/module-inventory-reservations-grid`

Canonical URL: https://packagento.com/mage-os/module-inventory-reservations-grid

## At a glance

- **Vendor**: mage-os (https://packagento.com/mage-os.md)
- **Latest version**: 1.0.5 — released 2026-05-09
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/mage-os/module-inventory-reservations-grid and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require mage-os/module-inventory-reservations-grid:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Add a grid with the list of inventory reservations.

## README

### Overview
The **MageOS Inventory Reservations Grid** module extends Magento's inventory management by providing an admin grid for viewing reservations and additional actions for managing them.

### Features
- View all inventory reservations in a structured grid.
- Manually clean compensated reservations (those resolving to zero) similar to Magento’s built-in cron job.
- Mass delete uncompensated reservations, which can be restricted based on ACL rules.
- Configuration to globally disable the mass delete action for all admins.

### Installation
Install via Composer:
```sh
composer require mage-os/module-inventory-reservations-grid
bin/magento module:enable MageOS_InventoryReservationsGrid
bin/magento setup:upgrade
```

### Usage

Find the new Inventory Reservations report at **Stores > Inventory > Reservations**.

### Configuration
Navigate to **Stores > Configuration > Catalog > Inventory > Reservation** to find the following setting:

- **Allow Delete Mass Action** (`cataloginventory/reservation/allow_delete`):
    - If enabled, allows admin users with the appropriate ACL permissions to delete uncompensated reservations.
    - Defaults to `0` (disabled).
    - Can be locked via `env.php` or `config.php`.

#### Blocking reservation deletion

Deleting inventory reservations can be a dangerous action that leaves inventory in an inconsistent state, depending on how your system works. This feature is disabled by default.

You can prevent reservation deletion from being enabled at all by running this command. This locks the setting to disabled in your `app/etc/env.php`.

```bash
bin/magento config:set --lock-env cataloginventory/reservation/allow_delete 0
```

### ACL Permissions
The module introduces fine-grained ACL rules to control access:

- **View Reservations** (`MageOS_InventoryReservationsGrid::view`)
- **Clean Balanced Reservations** (`MageOS_InventoryReservationsGrid::clean`)
- **Mass Delete Reservations** (`MageOS_InventoryReservationsGrid::delete`)

### Best Practices
- **Use the View-Only Mode**: This module allows viewing reservations without enabling deletion actions.
- **Be Cautious with Mass Deletion**: Removing uncompensated reservations can cause stock inconsistencies; only grant access to users who understand the implications.
- **Lock Configuration**: disable the mass delete function globally via `env.php` or `config.php`, and enable it only in case if there is specific need for using it.

### Additional Notes
Magento already runs a cron job (`inventory_cleanup_reservations`) to clean up compensated reservations. The manual clean button in this module serves as a fallback for scenarios where the cron does not execute properly. However, merchants needing to fix misalignments caused by external system issues can now remove uncompensated reservations where necessary, under controlled permissions.

### License
[Open Source License](LICENSE)

## Recent Versions

| Version | Released |
|---|---|
| 1.0.5 | 2026-05-09 |
| 1.0.4 | 2026-04-19 |
| 1.0.3 | 2026-03-27 |
| 1.0.2 | 2025-10-24 |
| 1.0.1 | 2025-10-16 |
| 1.0.0 | 2025-10-07 |

## Dependencies

### Require

| Package | Constraint |
|---|---|
| magento/framework | ^103.0 |
| magento/module-backend | * |
| magento/module-catalog | * |
| magento/module-catalog-inventory | * |
| magento/module-config | * |
| magento/module-customer | * |
| magento/module-inventory | * |
| magento/module-inventory-admin-ui | * |
| magento/module-inventory-reservations | * |
| magento/module-inventory-reservations-api | * |
| magento/module-store | * |

## Quality

Latest release (1.0.5) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | Pass | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | Pass |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Warning | 9 | 9 warnings (ruleset: Magento2) — 6 auto-fixable with phpcbf |
| PHPMD | Warning | 1 | 1 rule violation (UnusedFormalParameter:1) |
| Cpd | Pass | 0 |  |
| Composer validate | Info | 10 | valid; 10 advisory notes (composer validate --strict) |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 4 | 4 | – | – |
| 2.4.8 | – | 4 | 4 | – |
| 2.4.9 | – | – | 4 | 4 |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["mage-os/module-inventory-reservations-grid"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

mage-os is a Magento 2 vendor on Packagento. See https://packagento.com/mage-os.md for their full catalogue.

