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
- Akuntansi
- Inventaris
- PoS
- Project
- MRP
Pertanyaan ini telah diberikan tanda
1
Balas
3728
Tampilan
I've found a solution: I must override unlink method
Menikmati diskusi? Jangan hanya membaca, ikuti!
Buat akun sekarang untuk menikmati fitur eksklufi dan agar terlibat dengan komunitas kami!
DaftarPost Terkait | Replies | Tampilan | Aktivitas | |
---|---|---|---|---|
Delete Blank Lines
Diselesaikan
|
|
1
Agu 24
|
1737 | |
Delete Company (Odoo v14)
Diselesaikan
|
|
1
Nov 23
|
4249 | |
Delete my account
Diselesaikan
|
|
3
Nov 24
|
10542 | |
Selecting items for one2many relation
Diselesaikan
|
|
2
Des 22
|
14872 | |
|
1
Nov 21
|
4988 |