Repository navigation
[17.0][FIX] repair: orders on a location without warehouse kept the temporary records - #6062
Open
SamyShaawat wants to merge 1 commit into
Open
SamyShaawat wants to merge 1 commit into
SamyShaawat wants to merge 1 commit into
Conversation
…ry records Repair orders whose location_id has no warehouse (e.g. a customer location) were not matched by the picking type update, so they still pointed to the temporary location when it was deleted, which fails on the NOT NULL location_dest_id. Fall back to the first warehouse of the company.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #5474
Repair orders whose
location_idhas no warehouse (a customer location for example) are not matched by the update infill_repair_picking_type. They keep the temporary picking type and location, and deleting the temporary location then fails withnull value in column "location_dest_id" violates not-null constraint.This adds a second update for the orders still on the temporary picking type, using the first warehouse of their company.
I could not run a full 16.0 -> 17.0 migration here, so this is only checked by reading the SQL. A test on a real database with such orders would be welcome.