Commit a6a1fd58 authored by Alexandre Boeglin's avatar Alexandre Boeglin

An order line or delivery line that contains movements should not be

considered as a movement itself.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@19834 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7b955402
...@@ -182,6 +182,15 @@ class DeliveryLine(Movement, XMLObject, XMLMatrix, Variated, ...@@ -182,6 +182,15 @@ class DeliveryLine(Movement, XMLObject, XMLMatrix, Variated,
# cell, which define the same variated resource. # cell, which define the same variated resource.
# return XMLMatrix.hasCellContent(self, base_id=base_id) # return XMLMatrix.hasCellContent(self, base_id=base_id)
security.declareProtected( Permissions.AccessContentsInformation,
'isMovement' )
def isMovement(self):
"""
returns true is the object contains no submovement (line or cell)
"""
portal_type = self.getPortalMovementTypeList()
return len(self.contentValues(filter={'portal_type': portal_type})) == 0
security.declareProtected( Permissions.AccessContentsInformation, 'getCellValueList' ) security.declareProtected( Permissions.AccessContentsInformation, 'getCellValueList' )
def getCellValueList(self, base_id='movement'): def getCellValueList(self, base_id='movement'):
""" """
......
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