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
- Contabilità
- Magazzino
- PoS
- Project
- MRP
La domanda è stata contrassegnata
1
Rispondi
3738
Visualizzazioni
I've found a solution: I must override unlink method
Ti stai godendo la conversazione? Non leggere soltanto, partecipa anche tu!
Crea un account oggi per scoprire funzionalità esclusive ed entrare a far parte della nostra fantastica community!
RegistratiPost correlati | Risposte | Visualizzazioni | Attività | |
---|---|---|---|---|
Delete Blank Lines
Risolto
|
|
1
ago 24
|
1739 | |
Delete Company (Odoo v14)
Risolto
|
|
1
nov 23
|
4251 | |
Delete my account
Risolto
|
|
3
nov 24
|
10543 | |
|
2
dic 22
|
14875 | ||
|
1
nov 21
|
4997 |