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
- Kirjanpito
- Varastointi
- PoS
- Project
- MRP
Tämä kysymys on merkitty
1
Vastaa
3771
Näkymät
I've found a solution: I must override unlink method
Nautitko keskustelusta? Älä vain lue, vaan osallistu!
Luo tili jo tänään nauttiaksesi yksinoikeusominaisuuksista ja osallistuaksesi mahtavaan yhteisöömme!
RekisteröidyAiheeseen liittyviä artikkeleita | Vastaukset | Näkymät | Toimenpide | |
---|---|---|---|---|
Delete Blank Lines
Ratkaistu
|
|
1
elok. 24
|
1778 | |
Delete Company (Odoo v14)
Ratkaistu
|
|
1
marrask. 23
|
4274 | |
Delete my account
Ratkaistu
|
|
3
marrask. 24
|
10591 | |
Selecting items for one2many relation
Ratkaistu
|
|
2
jouluk. 22
|
14929 | |
|
1
marrask. 21
|
5053 |