From 42534e1b4a4c000605bf715afa66b6cc7af324aa Mon Sep 17 00:00:00 2001 From: Romain Courteaud <romain@nexedi.com> Date: Thu, 7 Jul 2005 07:47:08 +0000 Subject: [PATCH] Remove Factory Type Information. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@3420 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Document/ProductionReport.py | 59 +---------------- product/ERP5/Document/ProductionReportCell.py | 64 +----------------- product/ERP5/Document/ProductionReportLine.py | 66 ++----------------- 3 files changed, 10 insertions(+), 179 deletions(-) diff --git a/product/ERP5/Document/ProductionReport.py b/product/ERP5/Document/ProductionReport.py index 4c2d10b2c7..05f7270cbc 100755 --- a/product/ERP5/Document/ProductionReport.py +++ b/product/ERP5/Document/ProductionReport.py @@ -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, ) - } - ) - } - diff --git a/product/ERP5/Document/ProductionReportCell.py b/product/ERP5/Document/ProductionReportCell.py index 63bc954e0d..e0751c605f 100755 --- a/product/ERP5/Document/ProductionReportCell.py +++ b/product/ERP5/Document/ProductionReportCell.py @@ -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 - - - diff --git a/product/ERP5/Document/ProductionReportLine.py b/product/ERP5/Document/ProductionReportLine.py index 42e7a65485..749384eb91 100755 --- a/product/ERP5/Document/ProductionReportLine.py +++ b/product/ERP5/Document/ProductionReportLine.py @@ -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 -- 2.30.9