1.2 KiB
1.2 KiB
Stock Restrict Source Location
This module implements strict location filtering for Stock moves and Manufacturing Orders based on the configuration set in the Operation Type.
Features
- UI-Level Restriction: Restricts the "Pick From" location selection in both standard Transfers and MO "Detailed Operations" dialogs.
- Background Reservation Restriction: Overrides the reservation engine (
_get_gather_domain) to ensure auto-pick (Check Availability) only pulls stock from authorized locations. - MO Support: Specifically handles Manufacturing Orders by injecting the
active_mo_idandactive_move_idinto the context. - Frontend Patch: Includes a JavaScript patch (
stock_move_line_x2_many_field_patch.js) to ensure picking type context is maintained during frontend searches.
Dependencies
stockmrpstock_picking_type_m2m(Used to retrieve the list of allowed locations)
Usage
- Configure Allowed Source Locations on your Operation Type (e.g., Manufacturing).
- Create an MO or Transfer using that Operation Type.
- Both manual selection and the "Check Availability" button will now be restricted to precisely the locations you defined.