Skip to Content
Menu
This question has been flagged
1 Atsakyti
3458 Rodiniai

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".



Portretas
Atmesti
Best Answer

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

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
1
kov. 23
2096
1
spal. 23
1228
2
kov. 23
2900
3
rugp. 22
8897
1
spal. 21
11378