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
- Kế toán
- Tồn kho
- PoS
- Project
- MRP
Câu hỏi này đã bị gắn cờ
1
Trả lời
3763
Lượt xem
I've found a solution: I must override unlink method
Bạn có hứng thú với cuộc thảo luận không? Đừng chỉ đọc, hãy tham gia nhé!
Tạo tài khoản ngay hôm nay để tận hưởng các tính năng độc đáo và tham gia cộng đồng tuyệt vời của chúng tôi!
Đăng kýBài viết liên quan | Trả lời | Lượt xem | Hoạt động | |
---|---|---|---|---|
Delete Blank Lines
Đã xử lý
|
|
1
thg 8 24
|
1759 | |
Delete Company (Odoo v14)
Đã xử lý
|
|
1
thg 11 23
|
4265 | |
Delete my account
Đã xử lý
|
|
3
thg 11 24
|
10564 | |
|
2
thg 12 22
|
14913 | ||
|
1
thg 11 21
|
5037 |