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.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
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.
Create an account today to enjoy exclusive features and engage with our awesome community!
РегистрацияRelated Posts | Ответы | Просмотры | Активность | |
---|---|---|---|---|
|
2
авг. 25
|
2495 | ||
|
3
февр. 25
|
3797 | ||
|
0
мая 24
|
46 | ||
|
1
апр. 24
|
3512 | ||
|
4
сент. 23
|
5053 |
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)"