Skip to content

[17.0][FIX] repair: orders on a location without warehouse kept the temporary records - #6062

Open
SamyShaawat wants to merge 1 commit into
OCA:17.0from
SamyShaawat:17.0-fix-repair-orders-without-warehouse
Open

SamyShaawat wants to merge 1 commit into
OCA:17.0from
SamyShaawat:17.0-fix-repair-orders-without-warehouse

Conversation

@SamyShaawat

Copy link
Copy Markdown

Fixes #5474

Repair orders whose location_id has no warehouse (a customer location for example) are not matched by the update in fill_repair_picking_type. They keep the temporary picking type and location, and deleting the temporary location then fails with null 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.

…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.
@OCA-git-bot OCA-git-bot added mod:openupgrade_scripts Module openupgrade_scripts series:17.0 labels Oct 19, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mod:openupgrade_scripts Module openupgrade_scripts series:17.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants