Commit 669be4c8 authored by Romain Courteaud's avatar Romain Courteaud

Implement OrderTool like DeliveryTool.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3506 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3fac266e
...@@ -30,56 +30,32 @@ from Products.CMFCore.utils import UniqueObject ...@@ -30,56 +30,32 @@ from Products.CMFCore.utils import UniqueObject
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Globals import InitializeClass, DTMLFile from Globals import InitializeClass, DTMLFile
from Products.ERP5Type.Document.Folder import Folder from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ERP5 import _dtmldir from Products.ERP5 import _dtmldir
from zLOG import LOG class OrderTool(BaseTool):
class OrderTool(UniqueObject, Folder):
""" """
The OrderTool implements portal object The OrderTool implements portal object
expand policies. orders building policies.
Status : not ready
""" """
id = 'portal_orders' id = 'portal_orders'
meta_type = 'ERP5 Order Tool' meta_type = 'ERP5 Order Tool'
portal_type = 'Order Tool' portal_type = 'Order Tool'
allowed_types = () allowed_types = ('ERP5 Order Buider',)
# Declarative Security # Declarative Security
security = ClassSecurityInfo() security = ClassSecurityInfo()
#
# ZMI methods
#
manage_options = ( ( { 'label' : 'Overview'
, 'action' : 'manage_overview'
}
,
)
+ Folder.manage_options
)
security.declareProtected( Permissions.ManagePortal, 'manage_overview' ) security.declareProtected( Permissions.ManagePortal, 'manage_overview' )
manage_overview = DTMLFile( 'explainOrderTool', _dtmldir ) manage_overview = DTMLFile( 'explainOrderTool', _dtmldir )
# Filter content (ZMI)) security.declareProtected(Permissions.ModifyPortalContent, 'tic')
def __init__(self): def tic(self):
return Folder.__init__(self, OrderTool.id) """
We will look at all order builder and activate them.
# Filter content (ZMI)) """
def filtered_meta_types(self, user=None): pass
# Filters the list of available meta types.
all = OrderTool.inheritedAttribute('filtered_meta_types')(self)
meta_types = []
for meta_type in self.all_meta_types():
if meta_type['name'] in self.allowed_types:
meta_types.append(meta_type)
return meta_types
InitializeClass(OrderTool) InitializeClass(OrderTool)
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