Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
3624 Tampilan

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
Buang

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.

Penulis

The error was : 

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

Post Terkait Replies Tampilan Aktivitas
2
Agu 25
2490
3
Feb 25
3795
0
Mei 24
46
1
Apr 24
3512
4
Sep 23
5050