Wednesday, April 24, 2024
1 change · saas-17.2
Resolved issues and error corrections
Stock operation types must now have default source and destination locations set when configured. This prevents inventory moves from being created without a valid destination, reducing errors in warehouse processing after recent routing changes.
Original PR description
Since the pull&push refactor, the `location_dest_id` of a stock.move is now computed, based on its picking or picking type. It raises an issue, as a picking type can be created without a `default_location_dest_id`. This implies that a move can be created without any destination (no picking yet and picking type has no default dest), which makes no sense. Since we're in stable version, we can only enforce it on the client-side, a real requirement will be set in master. As we enforce the `default_location_dest_id`, we also enforce it for `default_location_src_id` for consistency's sake, even though it is far less critical. Doing so also means providing a compute that will give a default source/destination location regardless of the picking.type's `code`. --- I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr