Commit f0902443 authored by Alexandre Boeglin's avatar Alexandre Boeglin

Defined list operations (like movement = order_movement + delivery_movement +...

Defined list operations (like movement = order_movement + delivery_movement + invoice_movement) at function level instead of list level.
This makes getPortalAcquisitionMovementTypeList, getPortalMovementTypeList and getPortalSimulatedMovementTypeList reflect redefinitions of portal_order_movement_type_list, portal_delivery_movement_type_list and portal_invoice_movement_type_list made in the ERP5 Site object properties in the ZODB.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@2766 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 1dd1d41d
......@@ -114,17 +114,6 @@ portal_delivery_movement_type_list = (
'Balance Transaction Line',
)
portal_acquisition_movement_type_list = portal_order_movement_type_list + portal_delivery_movement_type_list + portal_invoice_movement_type_list
portal_movement_type_list = tuple(list(portal_order_movement_type_list) + \
list(portal_delivery_movement_type_list) + \
list(portal_invoice_movement_type_list) + \
['Simulation Movement']
)
portal_simulated_movement_type_list = tuple(filter(lambda x: x != 'Container Line' and x != 'Container Cell',
portal_movement_type_list))
portal_container_type_list = ('Container',)
portal_container_line_type_list = ('Container Line',)
......
......@@ -324,21 +324,21 @@ class ERP5Site ( CMFSite, FolderMixIn ):
"""
Return acquisition movement types.
"""
return self._getPortalConfiguration('portal_acquisition_movement_type_list')
return tuple(list(self.getPortalOrderMovementTypeList()) + list(self.getPortalDeliveryMovementTypeList()) + list(self.getPortalInvoiceMovementTypeList()))
security.declareProtected(Permissions.AccessContentsInformation, 'getPortalMovementTypeList')
def getPortalMovementTypeList(self):
"""
Return movement types.
"""
return self._getPortalConfiguration('portal_movement_type_list')
return tuple(list(self.getPortalOrderMovementTypeList()) + list(self.getPortalDeliveryMovementTypeList()) + list(self.getPortalInvoiceMovementTypeList()) + ['Simulation Movement'])
security.declareProtected(Permissions.AccessContentsInformation, 'getPortalSimulatedMovementTypeList')
def getPortalSimulatedMovementTypeList(self):
"""
Return simulated movement types.
"""
return self._getPortalConfiguration('portal_simulated_movement_type_list')
return tuple(filter(lambda x: x != 'Container Line' and x != 'Container Cell', self.getPortalMovementTypeList()))
security.declareProtected(Permissions.AccessContentsInformation, 'getPortalContainerTypeList')
def getPortalContainerTypeList(self):
......
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