跳至內容
選單
此問題已被標幟
1 回覆
3570 瀏覽次數

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

頭像
捨棄
相關帖文 回覆 瀏覽次數 活動
1
3月 23
2207
1
10月 23
1304
2
3月 23
3015
3
8月 22
9038
1
10月 21
11518