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
الرد
3709
أدوات العرض
I've found a solution: I must override unlink method
هل أعجبك النقاش؟ لا تكن مستمعاً فقط. شاركنا!
أنشئ حساباً اليوم لتستمتع بالخصائص الحصرية، وتفاعل مع مجتمعنا الرائع!
تسجيلالمنشورات ذات الصلة | الردود | أدوات العرض | النشاط | |
---|---|---|---|---|
Delete Blank Lines
تم الحل
|
|
1
أغسطس 24
|
1734 | |
Delete Company (Odoo v14)
تم الحل
|
|
1
نوفمبر 23
|
4245 | |
Delete my account
تم الحل
|
|
3
نوفمبر 24
|
10537 | |
|
2
ديسمبر 22
|
14868 | ||
|
1
نوفمبر 21
|
4976 |