İçereği Atla
Menü
Bu soru işaretlendi
2 Cevaplar
3647 Görünümler

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.

Avatar
Vazgeç

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.

Üretici

The error was : 

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

İlgili Gönderiler Cevaplar Görünümler Aktivite
2
Ağu 25
2496
3
Şub 25
3803
0
May 24
46
1
Nis 24
3512
4
Eyl 23
5055