[FIX] in delete function report protector
(lp:c2c-addons/6.1 rev 28.1.4)
parent
795dfa2d42
commit
4c97f3fabb
|
@ -32,15 +32,16 @@ class IrModelAccess(osv.osv):
|
||||||
def unlink(self, cr, uid, ids, context=None):
|
def unlink(self, cr, uid, ids, context=None):
|
||||||
res = True
|
res = True
|
||||||
context = context or {}
|
context = context or {}
|
||||||
|
# I'm note sur about this one maybe we should do nothing
|
||||||
if self._acces_can_be_modified(cr, uid, context=context):
|
if self._acces_can_be_modified(cr, uid, context=context):
|
||||||
res = super(IrModelAccess, self).write(cr, uid, ids, context=context)
|
vals = {'perm_read':False,
|
||||||
else: # I'm note sur about this one maybe we should do nothing
|
'perm_write': False,
|
||||||
self.write(cr, uid, args[0],
|
'perm_unlink': False,
|
||||||
{'perm_read':False,
|
'perm_create': False}
|
||||||
'perm_write': False,
|
super(IrModelAccess, self).write(cr, uid, ids, vals, context=context)
|
||||||
'perm_unlink': False,
|
else:
|
||||||
'perm_create': False},
|
res = super(IrModelAccess, self).unlink(cr, uid, ids, context=context)
|
||||||
context={context})
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
IrModelAccess()
|
IrModelAccess()
|
Loading…
Reference in New Issue