Commit 3d60a97b authored by Alexandre Boeglin's avatar Alexandre Boeglin

Add a new portal type group to make supplies consistent with other group

definitions


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5814 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c594d912
......@@ -165,7 +165,9 @@ portal_alarm_type_list = ('Supply Alarm Line','Alarm')
portal_payment_condition_type_list = ('Condition Paiement',)
portal_supply_type_list = ('Supply Line','Supply Cell')
portal_supply_type_list = ('Purchase Supply','Sale Supply')
portal_supply_movement_type_list = ('Supply Line','Supply Cell')
# This transaction lines are special because destination must be None.
portal_balance_transaction_line_type_list = ('Balance Transaction Line',)
......
......@@ -463,6 +463,15 @@ class ERP5Site ( FolderMixIn, CMFSite ):
return self._getPortalGroupedTypeList('supply') or\
self._getPortalConfiguration('portal_supply_type_list')
security.declareProtected(Permissions.AccessContentsInformation,
'getPortalSupplyMovementTypeList')
def getPortalSupplyMovementTypeList(self):
"""
Return supply movement types.
"""
return self._getPortalGroupedTypeList('supply_movement') or\
self._getPortalConfiguration('portal_supply_movement_type_list')
security.declareProtected(Permissions.AccessContentsInformation,
'getPortalAcquisitionMovementTypeList')
def getPortalAcquisitionMovementTypeList(self):
......@@ -471,7 +480,8 @@ class ERP5Site ( FolderMixIn, CMFSite ):
"""
return tuple(list(self.getPortalOrderMovementTypeList()) +
list(self.getPortalDeliveryMovementTypeList()) +
list(self.getPortalInvoiceMovementTypeList()))
list(self.getPortalInvoiceMovementTypeList()) +
list(self.getPortalSupplyMovementTypeList()))
security.declareProtected(Permissions.AccessContentsInformation,
'getPortalMovementTypeList')
......
......@@ -138,7 +138,7 @@ class ERP5TypeInformation( FactoryTypeInformation, RoleProviderBase ):
'container', 'container_line', 'delivery', 'delivery_movement',
'discount', 'invoice', 'invoice_movement', 'item',
'order', 'order_movement', 'node', 'payment_node', 'payment_condition',
'resource', 'supply', 'transformation', 'variation',
'resource', 'supply', 'supply_movement', 'transformation', 'variation',
'sub_variation'
)
group_list = ()
......
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