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 ?