Commit 9d99e267 authored by Sebastien Robin's avatar Sebastien Robin

ERP5Type: make isDeletable using keyword arguments instead of arguments

This allows to have a nice default behavior for isDeletable without
the need to bother which arguments we can pass.

Also, make isDeletable of simulation movement supporting keyword arguments
to avoid failures when generic action checking isDeletable is called
parent 691d649c
......@@ -354,7 +354,7 @@ class SimulationMovement(PropertyRecordableMixin, Movement, ExplainableMixin):
security.declareProtected( Permissions.AccessContentsInformation,
'isDeletable')
def isDeletable(self):
def isDeletable(self, **kw):
return not self.isFrozen() and not self._isTreeDelivered()
# Simulation Dates - acquire target dates
......
......@@ -2686,7 +2686,7 @@ class Base( CopyContainer,
security.declareProtected(Permissions.AccessContentsInformation,
'isDeletable')
def isDeletable(self, check_relation):
def isDeletable(self, check_relation=True):
"""Test if object can be delete"""
container = self.getParentValue()
portal = container.getPortalObject()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment