Commit f102f8c0 authored by Rafael Monnerat's avatar Rafael Monnerat

Minor change to make easier extend/customize the method in subclasses.



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@23831 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 2d4e52af
...@@ -191,8 +191,8 @@ class Delivery(XMLObject, ImmobilisationDelivery): ...@@ -191,8 +191,8 @@ class Delivery(XMLObject, ImmobilisationDelivery):
return self.getRelativeUrl() return self.getRelativeUrl()
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getMovementList') '_getMovementList')
def getMovementList(self, portal_type=None, **kw): def _getMovementList(self, portal_type=None, **kw):
""" """
Return a list of movements. Return a list of movements.
""" """
...@@ -221,6 +221,14 @@ class Delivery(XMLObject, ImmobilisationDelivery): ...@@ -221,6 +221,14 @@ class Delivery(XMLObject, ImmobilisationDelivery):
else: else:
add_movement(sub_object) add_movement(sub_object)
return movement_list return movement_list
security.declareProtected(Permissions.AccessContentsInformation,
'getMovementList')
def getMovementList(self, portal_type=None, **kw):
"""
Return a list of movements.
"""
return self._getMovementList(portal_type=portal_type, **kw)
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getSimulatedMovementList') 'getSimulatedMovementList')
...@@ -678,7 +686,6 @@ class Delivery(XMLObject, ImmobilisationDelivery): ...@@ -678,7 +686,6 @@ class Delivery(XMLObject, ImmobilisationDelivery):
if rule_reference is None: if rule_reference is None:
return return
portal_rules = getToolByName(self, 'portal_rules') portal_rules = getToolByName(self, 'portal_rules')
res = portal_rules.searchFolder(reference=rule_reference, res = portal_rules.searchFolder(reference=rule_reference,
validation_state="validated", sort_on='version', validation_state="validated", sort_on='version',
......
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