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:
- 客户关系管理
- e-Commerce
- 会计
- 库存
- PoS
- Project
- MRP
此问题已终结
1
回复
3777
查看
I've found a solution: I must override unlink method
相关帖文 | 回复 | 查看 | 活动 | |
---|---|---|---|---|
|
1
8月 24
|
1785 | ||
|
1
11月 23
|
4276 | ||
|
3
11月 24
|
10598 | ||
|
2
12月 22
|
14934 | ||
|
1
11月 21
|
5057 |