Skip to Content
Menu
This question has been flagged
2 Replies
3640 Rodiniai

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.

Portretas
Atmesti

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.

Autorius

The error was : 

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

Related Posts Replies Rodiniai Veikla
2
rugp. 25
2495
3
vas. 25
3801
0
geg. 24
46
1
bal. 24
3512
4
rugs. 23
5055