docs: update README to reflect expanded lot filtering scope, Odoo 19 signature changes, and adjusted logging levels

This commit is contained in:
Suherdy Yacob 2026-04-07 09:14:36 +07:00
parent d5a30de19c
commit b5d7fa0ecc

View File

@ -8,7 +8,7 @@ This module implements a robust, context-aware stock location restriction strate
- **Sub-location Support**: Uses the `child_of` operator to ensure that stock in all sub-shelves/aisles within an allowed zone is correctly visible.
- **Null-Safe Guard**: Includes a critical backend safety patch for `stock.move.line` that prevents "Missing product_id" validation errors during the cleanup of temporary/virtual records.
- **RPC Synchronized Loading**: Uses a high-performance Javascript pre-fetch mechanism to retrieve allowed zones from the server before loading the UI.
- **Lot Dropdown Filtering**: Restricts the Lot dropdown selection to ensure only lots available in authorized zones are displayed.
- **Lot Dropdown Filtering**: Restricts the Lot dropdown selection to ensure only lots available in authorized zones are displayed across all operation types (MO and standard Transfers).
## Dependencies
@ -21,7 +21,8 @@ This module implements a robust, context-aware stock location restriction strate
1. **Configure**: On an **Operation Type** (e.g., WHBK/Manufacturing), set the **Allowed Source Locations** (e.g., Packaging, Preparation).
2. **Operation**: Create a Manufacturing Order using that Operation Type.
3. **Component Selection**: In the "Components" tab, click "Add a line" or use the magnifier icon. The catalog will only show stock from the configured zones.
4. **Saving**: Click "Save" on the component line. The system will process reservations normally without any validation errors.
4. **Standard Transfers**: The same restrictions apply when selecting lots in regular inventory transfers linked to restricted Picking Types.
5. **Saving**: Click "Save" on the component line. The system will process reservations normally without any validation errors.
## Technical Implementation (V19 Stable)
@ -33,8 +34,8 @@ This module implements a robust, context-aware stock location restriction strate
### Python (Backend)
- **`StockMoveLine`**: Overrides `unlink()` to skip technical reservation updates for records missing a `product_id`. This prevents crashes during the disposal of temporary "virtual" records.
- **`StockLot`**: Overrides `name_search()` and `web_search_read()` to ensure lot-only dropdowns are also restricted to allowed zones.
- **`StockLot`**: Overrides `name_search(domain=...)` and `web_search_read()` to ensure lot-only dropdowns are also restricted. **Synced with Odoo 19 signature** using the `domain` parameter (formerly `args`).
- **`StockLocation`**: Provides a public `get_allowed_locations_for_mo` method for browser RPC accessibility.
## Logging & Debugging
- All identification traces are logged at the **ERROR** level under the tag `DEBUG_RESTRICT`. This ensures visibility in remote server consoles.
- All identification traces are logged at the **DEBUG** level under the tag `DEBUG_RESTRICT` to keep the production console clean while maintaining diagnostic capability.