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:
- Müşteri İlişkileri Yönetimi
- e-Commerce
- Muhasebe
- Envanter
- PoS
- Project
- MRP
Bu soru işaretlendi
1
Cevapla
3757
Görünümler
I've found a solution: I must override unlink method
Enjoying the discussion? Don't just read, join in!
Create an account today to enjoy exclusive features and engage with our awesome community!
Üye Olİlgili Gönderiler | Cevaplar | Görünümler | Aktivite | |
---|---|---|---|---|
Delete Blank Lines
Çözüldü
|
|
1
Ağu 24
|
1750 | |
Delete Company (Odoo v14)
Çözüldü
|
|
1
Kas 23
|
4257 | |
Delete my account
Çözüldü
|
|
3
Kas 24
|
10558 | |
|
2
Ara 22
|
14907 | ||
|
1
Kas 21
|
5036 |