Commit 63de28d7 authored by Sebastien Robin's avatar Sebastien Robin

added a propertySheet


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1912 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent a55784b0
......@@ -36,6 +36,7 @@ from Products.ERP5Type.XMLMatrix import XMLMatrix
from Products.ERP5.Variated import Variated
from Products.ERP5.Core.Resource import Resource as CoreResource
from Products.ERP5.Document.SupplyLine import SupplyLineMixin
from Products.CMFCore.WorkflowCore import WorkflowMethod
from zLOG import LOG
......@@ -66,52 +67,9 @@ class Resource(XMLMatrix, CoreResource, Variated):
, PropertySheet.Resource
, PropertySheet.Reference
, PropertySheet.FlowCapacity
, PropertySheet.VariationRange
)
# Factory Type Information
factory_type_information = \
{ 'id' : portal_type
, 'meta_type' : meta_type
, 'description' : """\
An Organisation object holds the information about
an organisation (ex. a division in a company, a company,
a service in a public administration)."""
, 'icon' : 'organisation_icon.gif'
, 'product' : 'ERP5'
, 'factory' : 'addResource'
, 'immediate_view' : 'resource_edit'
, 'actions' :
( { 'id' : 'view'
, 'name' : 'View'
, 'category' : 'object_view'
, 'action' : 'resource_edit'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'print'
, 'name' : 'Print'
, 'category' : 'object_print'
, 'action' : 'resource_print'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'metadata'
, 'name' : 'Metadata'
, 'category' : 'object_edit'
, 'action' : 'metadata_edit'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'translate'
, 'name' : 'Translate'
, 'category' : 'object_action'
, 'action' : 'translation_template_view'
, 'permissions' : (
Permissions.TranslateContent, )
}
)
}
# Is it OK now ?
# The same method is at about 3 different places
# Some genericity is needed
......@@ -588,6 +546,22 @@ a service in a public administration)."""
# Do nothing by default
pass
security.declareProtected( Permissions.ModifyPortalContent, 'validate' )
def validate(self):
"""
"""
pass
validate = WorkflowMethod( validate )
security.declareProtected( Permissions.ModifyPortalContent, 'invalidate' )
def invalidate(self):
"""
"""
pass
invalidate = WorkflowMethod( invalidate )
security.declareProtected( Permissions.ModifyPortalContent, 'updateSupplyMatrix' )
def updateSupplyMatrix(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