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
- Comptabilité
- Inventaire
- PoS
- Project
- MRP
Cette question a été signalée
1
Répondre
3713
Vues
I've found a solution: I must override unlink method
Vous appréciez la discussion ? Ne vous contentez pas de lire, rejoignez-nous !
Créez un compte dès aujourd'hui pour profiter de fonctionnalités exclusives et échanger avec notre formidable communauté !
S'inscrirePublications associées | Réponses | Vues | Activité | |
---|---|---|---|---|
Delete Blank Lines
Résolu
|
|
1
août 24
|
1736 | |
Delete Company (Odoo v14)
Résolu
|
|
1
nov. 23
|
4246 | |
Delete my account
Résolu
|
|
3
nov. 24
|
10538 | |
|
2
déc. 22
|
14868 | ||
|
1
nov. 21
|
4981 |