Permissions
Batch Update is a view-anything, change-only-what-you’re-allowed screen. Every field maps to a permission key, and warehouse assignment limits which rows you can touch at all.
Permission keys
| Permission key | Grants |
|---|---|
inventory.view | See the Batch Update screen |
inventory.update.batch | Edit the batch number |
inventory.update.expiry | Edit the expiry date |
inventory.update.selling_price | Edit the selling price (and use it in bulk update) |
inventory.update.purchase_price | Edit the purchase price (and use it in bulk update) |
inventory.adjust.increase | Increase stock, and add adjustment stock |
inventory.adjust.decrease | Decrease stock |
warehouse.manage | Legacy catch-all — grants all of the above |
Tenant owners have every permission implicitly.
How gating shows up
- Fields you can’t change are shown but disabled — you can read the current value but not edit it.
- The Increase / Decrease segments appear only if you hold that adjustment permission.
- The Update prices bulk control appears only if you can change selling or purchase price.
- Add Stock appears only if you can create inventory (via
inventory.adjust.increase). - With no editable permission at all, the header shows a View only badge and every row’s action is a lock.
Warehouse scoping
Beyond field permissions, you can only edit rows in warehouses you’re assigned to:
- If your account has no warehouse restrictions, you can edit every warehouse.
- If it’s restricted, rows outside your warehouses show a lock instead of Edit, and bulk actions skip them (the toast reports how many were skipped).
Auditing
Quantity adjustments are written through the adjust_inventory_quantity routine with a reason string, so increases and decreases are traceable. Price and reference-data edits update the inventory record’s updated_at.