Skip to content

[15.0 =>16.0] insert or update on table "stock_route_product" violates foreign key constraint "stock_route_product_route_id_fkey" #4154

@Aadeelyoo

Description

@Aadeelyoo

I got this error while migrating from odoo 15 to odoo 16 :

2023-05-25 09:41:57,233 24214 ERROR TEST_16 odoo.sql_db: bad query: ALTER TABLE "stock_route_product" ADD FOREIGN KEY ("route_id") REFERENCES "stock_route"("id") ON DELETE cascade
ERROR: insert or update on table "stock_route_product" violates foreign key constraint "stock_route_product_route_id_fkey"
DETAIL: Key (route_id)=(5) is not present in table "stock_route".

Any solution to fix this bug ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions