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
- Boekhouding
- Voorraad
- PoS
- Project
- MRP
Deze vraag is gerapporteerd
1
Beantwoorden
3758
Weergaven
I've found a solution: I must override unlink method
Geniet je van het gesprek? Blijf niet alleen lezen, doe ook mee!
Maak vandaag nog een account aan om te profiteren van exclusieve functies en deel uit te maken van onze geweldige community!
AanmeldenGerelateerde posts | Antwoorden | Weergaven | Activiteit | |
---|---|---|---|---|
Delete Blank Lines
Opgelost
|
|
1
aug. 24
|
1751 | |
Delete Company (Odoo v14)
Opgelost
|
|
1
nov. 23
|
4257 | |
Delete my account
Opgelost
|
|
3
nov. 24
|
10558 | |
|
2
dec. 22
|
14907 | ||
|
1
nov. 21
|
5036 |