コンテンツへスキップ
メニュー
この質問にフラグが付けられました
2 返信
3633 ビュー

Hi,

I am trying to delete some record from database and I got an error .

How I can change it to DELETE with an SQL request?

 self.sudo().with_context(key='value').sudo(SUPERUSER_ID).unlink()


Thanks.

アバター
破棄

The error is usually to prevent you from leaving your database in an inconsistent state. Like not allowing you to delete a product you have already delivered. What is the error? Bypassing unlink with SQL delete is not recommend.

著作者

The error was : 

"Record does not exist or has been deleted.
(Records: account.payment(xxxxxx,), User: Y)"

関連投稿 返信 ビュー 活動
2
8月 25
2495
3
2月 25
3797
0
5月 24
46
1
4月 24
3512
4
9月 23
5053