Commit b7e827fa authored by Jérome Perrin's avatar Jérome Perrin

Remove some FTIs



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@8130 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8987b8e9
...@@ -81,44 +81,3 @@ class Account(MetaNode, XMLObject): ...@@ -81,44 +81,3 @@ class Account(MetaNode, XMLObject):
, PropertySheet.Arrow , PropertySheet.Arrow
) )
# Factory Type Information
factory_type_information = \
{ 'id' : portal_type
, 'meta_type' : meta_type
, 'description' : """\
An Account is an abstract object which stores amounts of currencies."""
, 'icon' : 'account_icon.gif'
, 'product' : 'ERP5'
, 'factory' : 'addAccount'
, 'immediate_view' : 'account_view'
, 'actions' :
( { 'id' : 'view'
, 'name' : 'View'
, 'category' : 'object_view'
, 'action' : 'account_view'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'print'
, 'name' : 'Print'
, 'category' : 'object_print'
, 'action' : 'account_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, )
}
)
}
...@@ -74,60 +74,6 @@ class AmountFilter(MappedValue, Amount): ...@@ -74,60 +74,6 @@ class AmountFilter(MappedValue, Amount):
, PropertySheet.MappedValue , PropertySheet.MappedValue
) )
# Factory Type Information
factory_type_information = \
{ 'id' : portal_type
, 'meta_type' : meta_type
, 'description' : """\
Une ligne tarifaire."""
, 'icon' : 'order_line_icon.gif'
, 'product' : 'ERP5'
, 'factory' : 'addAmountFilter'
, 'immediate_view' : 'amount_filter_view'
, 'allow_discussion' : 1
, 'allowed_content_types': ('',
)
, 'filter_content_types' : 1
, 'global_allow' : 1
, 'actions' :
( { 'id' : 'view'
, 'name' : 'View'
, 'category' : 'object_view'
, 'action' : 'amount_filter_view'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'list'
, 'name' : 'Object Contents'
, 'category' : 'object_action'
, 'action' : 'folder_contents'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'print'
, 'name' : 'Print'
, 'category' : 'object_print'
, 'action' : 'amount_filter_print'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'metadata'
, 'name' : 'Metadata'
, 'category' : 'object_view'
, 'action' : 'metadata_edit'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'translate'
, 'name' : 'Translate'
, 'category' : 'object_action'
, 'action' : 'translation_template_view'
, 'permissions' : (
Permissions.TranslateContent, )
}
)
}
security.declareProtected(Permissions.AccessContentsInformation, 'update') security.declareProtected(Permissions.AccessContentsInformation, 'update')
def update(self, amount_line): def update(self, amount_line):
context = self.aq_parent.asContext(**amount_line) context = self.aq_parent.asContext(**amount_line)
...@@ -141,4 +87,5 @@ Une ligne tarifaire.""" ...@@ -141,4 +87,5 @@ Une ligne tarifaire."""
if self.getResource(): if self.getResource():
amount_line['resource'] = self.getResource() amount_line['resource'] = self.getResource()
if self.getVariationCategoryList(): if self.getVariationCategoryList():
amount_line['variation_category_list'] = self.getVariationCategoryList() amount_line['variation_category_list'] = \
self.getVariationCategoryList()
...@@ -149,50 +149,6 @@ class AssortedResource(TransformedResource): ...@@ -149,50 +149,6 @@ class AssortedResource(TransformedResource):
'mode' : 'w' }, 'mode' : 'w' },
) )
# Factory Type Information
factory_type_information = \
{ 'id' : portal_type
, 'meta_type' : meta_type
, 'description' : """\
A bank account number holds a collection of numbers
and codes (ex. SWIFT, RIB, etc.) which may be used to
identify a bank account."""
, 'icon' : 'assorted_resource_icon.gif'
, 'product' : 'ERP5'
, 'factory' : 'addAssortedResource'
, 'immediate_view' : 'assorted_resource_view'
, 'actions' :
( { 'id' : 'view'
, 'name' : 'View'
, 'category' : 'object_view'
, 'action' : 'assorted_resource_view'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'print'
, 'name' : 'Print'
, 'category' : 'object_print'
, 'action' : 'assorted_resource_print'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'metadata'
, 'name' : 'Metadata'
, 'category' : 'object_view'
, 'action' : 'metadata_edit'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'translate'
, 'name' : 'Translate'
, 'category' : 'object_action'
, 'action' : 'translation_template_view'
, 'permissions' : (
Permissions.TranslateContent, )
}
)
}
security.declareProtected(Permissions.AccessContentsInformation, 'getAssortedVariationCategoryList') security.declareProtected(Permissions.AccessContentsInformation, 'getAssortedVariationCategoryList')
def getAssortedVariationCategoryList(self, cell_index): def getAssortedVariationCategoryList(self, cell_index):
""" """
......
...@@ -54,48 +54,3 @@ class Binder(Folder, Document): ...@@ -54,48 +54,3 @@ class Binder(Folder, Document):
, PropertySheet.DublinCore , PropertySheet.DublinCore
) )
# CMF Factory Type Information
factory_type_information = \
{ 'id' : portal_type
, 'meta_type' : meta_type
, 'description' : """\
Folders allow to store a large number of documents (1,000,000 should not
be a problem)."""
, 'icon' : 'folder_icon.gif'
, 'product' : 'ERP5'
, 'factory' : 'addFolder'
, 'filter_content_types' : 0
, 'immediate_view' : 'folder_edit_form'
, 'actions' :
( { 'id' : 'view'
, 'name' : 'View'
, 'action' : 'folder_view'
, 'permissions' : (Permissions.View,)
, 'category' : 'folder'
}
, { 'id' : 'edit'
, 'name' : 'Edit'
, 'action' : 'folder_edit_form'
, 'permissions' : (Permissions.ManageProperties,)
, 'category' : 'folder'
}
, { 'id' : 'localroles'
, 'name' : 'Local Roles'
, 'action' : 'folder_localrole_form'
, 'permissions' : (Permissions.ManageProperties,)
, 'category' : 'folder'
}
, { 'id' : 'syndication'
, 'name' : 'Syndication'
, 'action' : 'synPropertiesForm'
, 'permissions' : (Permissions.ManageProperties,)
, 'category' : 'folder'
}
, { 'id' : 'foldercontents'
, 'name' : 'Folder contents'
, 'action' : 'folder_contents'
, 'permissions' : (Permissions.ListFolderContents,)
, 'category' : 'folder'
}
)
}
...@@ -56,51 +56,10 @@ class DependentCapacity(Capacity): ...@@ -56,51 +56,10 @@ class DependentCapacity(Capacity):
, PropertySheet.Amount , PropertySheet.Amount
) )
# Factory Type Information
factory_type_information = \
{ 'id' : portal_type
, 'meta_type' : meta_type
, 'description' : """\
Items in ERP5 are intended to provide a way to track objects."""
, 'icon' : 'item_icon.gif'
, 'product' : 'ERP5'
, 'factory' : 'addDependentCapacity'
, 'immediate_view' : 'dependent_capacity_view'
, 'actions' :
( { 'id' : 'view'
, 'name' : 'View'
, 'category' : 'object_view'
, 'action' : 'dependent_capacity_view'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'print'
, 'name' : 'Print'
, 'category' : 'object_print'
, 'action' : 'dependent_capacity_print'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'metadata'
, 'name' : 'Metadata'
, 'category' : 'object_edit'
, 'action' : 'metadata_view'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'translate'
, 'name' : 'Translate'
, 'category' : 'object_action'
, 'action' : 'translation_template_view'
, 'permissions' : (
Permissions.TranslateContent, )
}
)
}
security.declareProtected(Permissions.View, 'asCapacityItemList') security.declareProtected(Permissions.View, 'asCapacityItemList')
def asCapacityItemList(self): def asCapacityItemList(self):
""" """
Returns an association list of points and capacity values Returns an association list of points and capacity values
""" """
return map(lambda capacity: ((capacity, self.getQuantity())), self.getResourceList()) return map(lambda capacity:((capacity, self.getQuantity())),
self.getResourceList())
...@@ -60,44 +60,3 @@ class Device(Item): ...@@ -60,44 +60,3 @@ class Device(Item):
, PropertySheet.Device , PropertySheet.Device
) )
# Factory Type Information
factory_type_information = \
{ 'id' : portal_type
, 'meta_type' : meta_type
, 'description' : """\
Devices represent equipments with one network interface."""
, 'icon' : 'item_icon.gif'
, 'product' : 'ERP5'
, 'factory' : 'addDevice'
, 'immediate_view' : 'device_view'
, 'actions' :
( { 'id' : 'view'
, 'name' : 'View'
, 'category' : 'object_view'
, 'action' : 'device_view'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'print'
, 'name' : 'Print'
, 'category' : 'object_print'
, 'action' : 'device_print'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'metadata'
, 'name' : 'Metadata'
, 'category' : 'object_view'
, 'action' : 'metadata_view'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'translate'
, 'name' : 'Translate'
, 'category' : 'object_action'
, 'action' : 'translation_template_view'
, 'permissions' : (
Permissions.TranslateContent, )
}
)
}
...@@ -66,50 +66,6 @@ class GeographicAddress(Coordinate, Base): ...@@ -66,50 +66,6 @@ class GeographicAddress(Coordinate, Base):
# Declarative interfaces # Declarative interfaces
__implements__ = ( Interface.Coordinate ) __implements__ = ( Interface.Coordinate )
# Factory Type Information
factory_type_information = \
{ 'id' : portal_type
, 'meta_type' : meta_type
, 'description' : """\
A geographic address holds a complete set of
geographic coordinates including street, number,
city, zip code, region."""
, 'icon' : 'geographic_address_icon.gif'
, 'product' : 'ERP5'
, 'factory' : 'addGeographicAddress'
, 'immediate_view' : 'geographic_address_edit'
, 'actions' :
( { 'id' : 'view'
, 'name' : 'View'
, 'category' : 'object_view'
, 'action' : 'geographic_address_edit'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'print'
, 'name' : 'Print'
, 'category' : 'object_print'
, 'action' : 'geographic_address_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, )
}
)
}
security.declareProtected(Permissions.View, 'asText') security.declareProtected(Permissions.View, 'asText')
def asText(self, country=''): def asText(self, country=''):
""" """
......
...@@ -56,48 +56,6 @@ class IndependentCapacity(Capacity): ...@@ -56,48 +56,6 @@ class IndependentCapacity(Capacity):
, PropertySheet.Amount , PropertySheet.Amount
) )
# Factory Type Information
factory_type_information = \
{ 'id' : portal_type
, 'meta_type' : meta_type
, 'description' : """\
Items in ERP5 are intended to provide a way to track objects."""
, 'icon' : 'item_icon.gif'
, 'product' : 'ERP5'
, 'factory' : 'addIndependentCapacity'
, 'immediate_view' : 'independent_capacity_view'
, 'actions' :
( { 'id' : 'view'
, 'name' : 'View'
, 'category' : 'object_view'
, 'action' : 'independent_capacity_view'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'print'
, 'name' : 'Print'
, 'category' : 'object_print'
, 'action' : 'independent_capacity_print'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'metadata'
, 'name' : 'Metadata'
, 'category' : 'object_edit'
, 'action' : 'metadata_view'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'translate'
, 'name' : 'Translate'
, 'category' : 'object_action'
, 'action' : 'translation_template_view'
, 'permissions' : (
Permissions.TranslateContent, )
}
)
}
security.declareProtected(Permissions.View, 'asCapacityItemList') security.declareProtected(Permissions.View, 'asCapacityItemList')
def asCapacityItemList(self): def asCapacityItemList(self):
""" """
......
...@@ -76,50 +76,6 @@ class MappedValue(Predicate, Amount): ...@@ -76,50 +76,6 @@ class MappedValue(Predicate, Amount):
, PropertySheet.MappedValue , PropertySheet.MappedValue
) )
# Factory Type Information
factory_type_information = \
{ 'id' : portal_type
, 'meta_type' : meta_type
, 'description' : """\
A bank account number holds a collection of numbers
and codes (ex. SWIFT, RIB, etc.) which may be used to
identify a bank account."""
, 'icon' : 'transformed_resource_icon.gif'
, 'product' : 'ERP5'
, 'factory' : 'addMappedValue'
, 'immediate_view' : 'mapped_value_view'
, 'actions' :
( { 'id' : 'view'
, 'name' : 'View'
, 'category' : 'object_view'
, 'action' : 'mapped_value_view'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'print'
, 'name' : 'Print'
, 'category' : 'object_print'
, 'action' : 'mapped_value_print'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'metadata'
, 'name' : 'Metadata'
, 'category' : 'object_view'
, 'action' : 'metadata_edit'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'translate'
, 'name' : 'Translate'
, 'category' : 'object_action'
, 'action' : 'translation_template_view'
, 'permissions' : (
Permissions.TranslateContent, )
}
)
}
security.declarePrivate( '_edit' ) security.declarePrivate( '_edit' )
def _edit(self, REQUEST=None, force_update = 0, **kw): def _edit(self, REQUEST=None, force_update = 0, **kw):
# We must first prepare the mapped value before we do the edit # We must first prepare the mapped value before we do the edit
......
...@@ -56,51 +56,8 @@ class MetaNode(Node, CoreMetaNode): ...@@ -56,51 +56,8 @@ class MetaNode(Node, CoreMetaNode):
, PropertySheet.DublinCore , PropertySheet.DublinCore
) )
# Factory Type Information security.declareProtected( Permissions.ModifyPortalContent,
factory_type_information = \ 'immediateUpdateCapacity' )
{ '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' : 'addOrganisation'
, 'immediate_view' : 'organisation_edit'
, 'actions' :
( { 'id' : 'view'
, 'name' : 'View'
, 'category' : 'object_view'
, 'action' : 'organisation_edit'
, 'permissions' : (
Permissions.View, )
}
, { 'id' : 'print'
, 'name' : 'Print'
, 'category' : 'object_print'
, 'action' : 'organisation_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, )
}
)
}
security.declareProtected( Permissions.ModifyPortalContent, 'immediateUpdateCapacity' )
def immediateUpdateCapacity(self): def immediateUpdateCapacity(self):
""" """
Lookup for capacities children of self and update capacity attributes Lookup for capacities children of self and update capacity attributes
...@@ -109,7 +66,8 @@ a service in a public administration).""" ...@@ -109,7 +66,8 @@ a service in a public administration)."""
portal_simulation = getToolByName(self, 'portal_simulation') portal_simulation = getToolByName(self, 'portal_simulation')
portal_simulation.updateCapacity(self) portal_simulation.updateCapacity(self)
security.declareProtected( Permissions.ModifyPortalContent, 'updateCapacity' ) security.declareProtected( Permissions.ModifyPortalContent,
'updateCapacity' )
def updateCapacity(self): def updateCapacity(self):
""" """
Lookup for capacities children of self and update capacity attributes Lookup for capacities children of self and update capacity attributes
......
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