Hey
I just created a custom model which is having many2one relation with Supplier Shipment
when I try to delete a record from custom model I cannot delete it . there is no error at all
Hey
I just created a custom model which is having many2one relation with Supplier Shipment
when I try to delete a record from custom model I cannot delete it . there is no error at all
You probably override the ModelStorage.delete
method without calling super()
.
I have created a simple custom model … how can I know wether I have override the ModelStorage.delete ?
Here is my code
@classmethod
def __setup__(cls):
super(QualityControlPostproduction, cls).__setup__()
cls._transitions |= set((
('draft', 'approved'),
('approved', 'draft'),
('draft', 'rejected'),
('rejected', 'draft'),
))
cls._buttons.update({
'draft': {
'invisible': ~Eval('state').in_(['approved', 'rejected',
]),
'depends': ['state'],
},
'approve': {
'invisible': ~Eval('state').in_(['draft'
]),
'depends': ['state'],
},
'reject': {
'invisible': ~Eval('state').in_(['draft'
]),
'depends': ['state'],
}
})
If your class has a method like:
@classmethod
def delete(cls, ...):
...
then you have overridden the ModelStorage.delete
method.
Seems like it was my mistake … one of the users removed the delete permissions from the model access sorry for the trouble