Hello,
When I'm deleting model instance I want to check some conditions and if that conditions are true then allow deleting and if conditions are false don't allow user to delete entry.
So what I thought, __del__() method is destructor and first I was thinking to use this function but after some testings it doesn't work as I want, so I must find another way. I want to find a way to test conditions before deletion happens and decide allow or not.
If question is still unclear tell me.
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Buchhaltung
- Lager
- PoS
- Project
- MRP
Diese Frage wurde gekennzeichnet
1
Antworten
3774
Ansichten
I've found a solution: I must override unlink method
Diskutieren Sie gerne? Treten Sie bei, statt nur zu lesen!
Erstellen Sie heute ein Konto, um exklusive Funktionen zu nutzen und mit unserer tollen Community zu interagieren!
RegistrierenVerknüpfte Beiträge | Antworten | Ansichten | Aktivität | |
---|---|---|---|---|
Delete Blank Lines
Gelöst
|
|
1
Aug. 24
|
1780 | |
Delete Company (Odoo v14)
Gelöst
|
|
1
Nov. 23
|
4275 | |
Delete my account
Gelöst
|
|
3
Nov. 24
|
10591 | |
|
2
Dez. 22
|
14931 | ||
|
1
Nov. 21
|
5054 |