跳至内容
菜单
此问题已终结
2 回复
3655 查看

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
2507
3
2月 25
3807
0
5月 24
46
1
4月 24
3515
4
9月 23
5058