Siirry sisältöön
Menu
Sinun on rekisteröidyttävä, jotta voit olla vuorovaikutuksessa yhteisön kanssa.
Tämä kysymys on merkitty
1 Vastaa
3438 Näkymät

I've deleted this constraint  stock_quant_product_id_fkey  but still showing this error.

Error:

The operation cannot be completed: another model requires the record being deleted. If possible, archive it instead. Model: Quants (stock.quant), Constraint: stock_quant_product_id_fkey

Logs: 

psycopg2.IntegrityError: insert or update on table "stock_quant" violates foreign key constraint "stock_quant_product_id_fkey"

DETAIL: Key (product_id)=(40057) is not present in table "product_product".



Avatar
Hylkää
Paras vastaus

You are trying to insert a product id in product_id field which isn't exist on product_product table

Avatar
Hylkää
Aiheeseen liittyviä artikkeleita Vastaukset Näkymät Toimenpide
1
maalisk. 23
2084
1
lokak. 23
1219
2
maalisk. 23
2888
3
elok. 22
8869
1
lokak. 21
11351