Commit 42534e1b authored by Romain Courteaud's avatar Romain Courteaud

Remove Factory Type Information.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3420 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 63808e1f
......@@ -41,9 +41,6 @@ class ProductionReport(Delivery):
# CMF Type Definition
meta_type = 'ERP5 Production Report'
portal_type = 'Production Report'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
isDelivery = 1
# Declarative security
......@@ -59,59 +56,5 @@ class ProductionReport(Delivery):
, PropertySheet.Arrow
, PropertySheet.Movement
, PropertySheet.Delivery
, PropertySheet.Reference
)
# CMF Factory Type Information
factory_type_information = \
{ 'id' : portal_type
, 'meta_type' : meta_type
, 'description' : """\
An order..."""
, 'icon' : 'transaction_icon.gif'
, 'product' : 'ERP5'
, 'factory' : 'addProductionReport'
, 'immediate_view' : 'production_report_view'
, 'allow_discussion' : 1
, 'allowed_content_types': ('Movement',
)
, 'filter_content_types' : 1
, 'global_allow' : 1
, 'actions' :
( { 'id' : 'view'
, 'name' : 'View'
, 'category' : 'object_view'
, 'action' : 'production_report_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' : 'transaction_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, )
}
)
}
......@@ -42,9 +42,6 @@ class ProductionReportCell(DeliveryCell):
meta_type = 'ERP5 Production Report Cell'
portal_type = 'Production Report Cell'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
isMovement = 1
# Declarative security
......@@ -57,6 +54,7 @@ class ProductionReportCell(DeliveryCell):
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.CategoryCore
, PropertySheet.Arrow
, PropertySheet.Amount
, PropertySheet.Task
, PropertySheet.Movement
......@@ -66,67 +64,11 @@ class ProductionReportCell(DeliveryCell):
, PropertySheet.ItemAggregation
)
# 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' : 'addProductionReportCell'
, 'immediate_view' : 'production_report_cell_view'
, 'allow_discussion' : 1
, 'allowed_content_types': ('',
)
, 'filter_content_types' : 1
, 'global_allow' : 1
, 'actions' :
( { 'id' : 'view'
, 'name' : 'View'
, 'category' : 'object_view'
, 'action' : 'production_report_cell_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' : 'production_report_cell_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.ModifyPortalContent, 'hasCellContent' )
security.declareProtected(Permissions.ModifyPortalContent,
'hasCellContent')
def hasCellContent(self, base_id='movement'):
"""
This method can be overriden
"""
return 0
......@@ -40,9 +40,6 @@ class ProductionReportLine(DeliveryLine):
meta_type = 'ERP5 Production Report Line'
portal_type = 'Production Report Line'
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security
security = ClassSecurityInfo()
......@@ -50,72 +47,21 @@ class ProductionReportLine(DeliveryLine):
# Declarative properties
property_sheets = ( PropertySheet.Base
, PropertySheet.SimpleItem
, PropertySheet.XMLObject
, PropertySheet.CategoryCore
, PropertySheet.Amount
, PropertySheet.Task
, PropertySheet.Arrow
, PropertySheet.Movement
, PropertySheet.Price
, PropertySheet.VariationRange
, PropertySheet.ItemAggregation
)
# Declarative interfaces
__implements__ = ( )
# Factory Type Information
factory_type_information = \
{ 'id' : portal_type
, 'meta_type' : meta_type
, 'description' : """\
Une ligne tarifaire."""
, 'icon' : 'production_report_line_icon.gif'
, 'product' : 'ERP5'
, 'factory' : 'addProductionReportLine'
, 'immediate_view' : 'production_report_line_view'
, 'allow_discussion' : 1
, 'allowed_content_types': ('',
)
, 'filter_content_types' : 1
, 'global_allow' : 1
, 'actions' :
( { 'id' : 'view'
, 'name' : 'View'
, 'category' : 'object_view'
, 'action' : 'production_report_line_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' : 'acccounting_transaction_line_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.ModifyPortalContent, 'newCellContent' )
security.declareProtected( Permissions.ModifyPortalContent, 'newCellContent')
def newCellContent(self, id,**kw):
"""
This method can be overriden
......
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