[18.0][ADD] barcode_stock_unexpected_product #23
All Vouch review confidence checks passed
Residual risk 0.24 = Change Risk (0.42) × (1 − Review Confidence (0.43)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.42 · 342 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.349
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #23"
general
weight: 0.35
edescalona
Summary
barcode_stock_unexpected_productextends the barcode scanner ofbarcode_stockso an operator can add a product that is not part of a transfer's planned lines, instead of being told that the barcode is not part of the operation.The feature is opt-in per operation type. When it is enabled, scanning an unlisted product on the barcode picking screen opens the product selector with the scanned product (and any GS1 quantity/lot) preselected. The operator confirms the demand quantity and the module creates or merges a manually added move, reserving the available stock. Manually added lines can also be deleted from the picking screen.
Why
With
barcode_stock, a scan is only accepted when the product belongs to the current transfer. Warehouse operators sometimes need to add an unexpected product on the spot (for example, a replacement or an extra unit found during picking). Sending them back to the back office breaks the barcode workflow. This module adds that capability without changing the default behaviour: where the setting is off, the scanner keeps rejecting unlisted products exactly as before.Reference: @BinhexTeam T26646
Configuration
1. Go to Inventory ▸ Configuration ▸ Operation Types and open an internal operation type.
2. On the Barcode tab, tick Allow Adding New Product Lines from the Scanner.
The field (
allow_insert_new_line) is a stored boolean, defaults toFalse, and is only rendered forcode == "internal".Usage
1. Open a planned internal transfer in the barcode app.
2. Scan a product that is not in the transfer's move lines.
3. The product selector opens with the product preselected; set the quantity and, for tracked products, the lot/serial number.
4. Confirm: the move is added as pending demand and the available stock is reserved. Scanning the same product again merges into the same manual move.
5. Use the delete action on a manually added line to remove it and release its reservation.
Only products with enough available stock at the source location can be added; otherwise the operator gets an explicit error.
How to test
Manual:
1. Install
barcode_stock_unexpected_product.2. Enable Allow Adding New Product Lines from the Scanner on an internal operation type.
3. Create and confirm an internal transfer with at least one planned line.
4. Scan an unlisted product, confirm the selector, and check that a manual line is created and reserved.
5. Repeat the scan and check that the quantity is merged.
6. Delete the manual line and check that the reservation is released.
7. Disable the setting and check that the unlisted scan is rejected again; also check that creating an internal transfer from scratch still works.