Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
3548 มุมมอง

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



อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
มี.ค. 23
2171
1
ต.ค. 23
1296
2
มี.ค. 23
3003
3
ส.ค. 22
9016
1
ต.ค. 21
11471