Tuesday, December 1, 2020
1 change · master
Enhancements to existing features
Inventory reservations can now be configured by operation type, letting businesses choose whether stock is reserved immediately, manually, or only near the scheduled date. This helps prevent future orders from taking stock needed for urgent work, while the old just-in-time procurement module is folded into sales inventory logic.
Original PR description
Currently stock moves are auto-assigned (i.e. reserve free stock) both when the scheduler is run and when a corresponding stock move that can assign a move is completed. This strictness was causing…
Currently stock moves are auto-assigned (i.e. reserve free stock) both when the scheduler is run and when a corresponding stock move that can assign a move is completed. This strictness was causing issues for prioritization of moves to assign, for example a picking with a scheduled_date far in the future could automatically reserve all stock if it was created before another picking that an immediate scheduled_date. To ease this, an extra setting has been added to stock.picking.type to let users choose how reservations should occur for moves assigned to that picking_type (or picking with that picking_type) when the move is already confirmed: 1. 'at_confirm' = automatically when new stock becomes available or when the scheduler is triggered. 2. 'manual' = user must always manually click "Check Availability" button (scheduler will no longer reserve). 3. 'by_date' = automatically when new stock becomes available or when the scheduler is run within the move's reservation_date. 'by_date' has an extra option of # days before the move's scheduled date that affects the move.reservation_date. Additionally, because this new feature overlaps with the `procurement_jit` module's functionality, we remove the module and ensure its logic is reproduced directly in `sale_stock`. Task: 2359317 Upgrade PR: odoo/upgrade#1868 ENT PR: odoo/enterprise#15050 -- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr