diff --git a/product/ERP5/__init__.py b/product/ERP5/__init__.py index 0558a91f46990418faf37446f3412077cefc0234..e1649c9f53b09bb1a23f6730f31120634e1f701f 100644 --- a/product/ERP5/__init__.py +++ b/product/ERP5/__init__.py @@ -41,7 +41,7 @@ from Products.ERP5Type.Globals import package_home product_path = package_home( globals() ) # Define object classes and tools -from Tool import CategoryTool, RuleTool, IdTool, TemplateTool,\ +from Tool import CategoryTool, IdTool, TemplateTool,\ TestTool, DomainTool, AlarmTool, OrderTool, DeliveryTool,\ TrashTool, ContributionTool, NotificationTool, PasswordTool,\ GadgetTool, ContributionRegistryTool, IntrospectionTool,\ @@ -55,7 +55,6 @@ object_classes = ( ERP5Site.ERP5Site, SQLMethod.SQLMethod, ) portal_tools = ( CategoryTool.CategoryTool, - RuleTool.RuleTool, IdTool.IdTool, TemplateTool.TemplateTool, AlarmTool.AlarmTool, diff --git a/product/ERP5/Tool/RuleTool.py b/product/ERP5/bootstrap/erp5_core/ToolComponentTemplateItem/portal_components/tool.erp5.RuleTool.py similarity index 96% rename from product/ERP5/Tool/RuleTool.py rename to product/ERP5/bootstrap/erp5_core/ToolComponentTemplateItem/portal_components/tool.erp5.RuleTool.py index 5c7ccd25d068e71c31ec16da79903ea576923a29..0de8aa70867652891dde71e695b0771857545d54 100644 --- a/product/ERP5/Tool/RuleTool.py +++ b/product/ERP5/bootstrap/erp5_core/ToolComponentTemplateItem/portal_components/tool.erp5.RuleTool.py @@ -31,9 +31,8 @@ from collections import defaultdict from zLOG import LOG, INFO from Products.ERP5Type.Tool.BaseTool import BaseTool from AccessControl import ClassSecurityInfo -from Products.ERP5Type.Globals import InitializeClass, DTMLFile +from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type import Permissions -from Products.ERP5 import _dtmldir from Products.ERP5Type.UnrestrictedMethod import UnrestrictedMethod class RuleTool(BaseTool): @@ -85,9 +84,6 @@ class RuleTool(BaseTool): # Declarative Security security = ClassSecurityInfo() - security.declareProtected( Permissions.ManagePortal, 'manage_overview' ) - manage_overview = DTMLFile( 'explainRuleTool', _dtmldir ) - security.declareProtected(Permissions.AccessContentsInformation, 'searchRuleList') def searchRuleList(self, movement, tested_base_category_list=None, **kw): diff --git a/product/ERP5/bootstrap/erp5_core/ToolComponentTemplateItem/portal_components/tool.erp5.RuleTool.xml b/product/ERP5/bootstrap/erp5_core/ToolComponentTemplateItem/portal_components/tool.erp5.RuleTool.xml new file mode 100644 index 0000000000000000000000000000000000000000..9c7a7f1021161976a2591bdf7f56a76b6c6998c1 --- /dev/null +++ b/product/ERP5/bootstrap/erp5_core/ToolComponentTemplateItem/portal_components/tool.erp5.RuleTool.xml @@ -0,0 +1,110 @@ +<?xml version="1.0"?> +<ZopeData> + <record id="1" aka="AAAAAAAAAAE="> + <pickle> + <global name="Tool Component" module="erp5.portal_type"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>default_reference</string> </key> + <value> <string>RuleTool</string> </value> + </item> + <item> + <key> <string>default_source_reference</string> </key> + <value> <string>Products.ERP5.Tool.RuleTool</string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>tool.erp5.RuleTool</string> </value> + </item> + <item> + <key> <string>portal_type</string> </key> + <value> <string>Tool Component</string> </value> + </item> + <item> + <key> <string>sid</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>text_content_error_message</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>text_content_warning_message</string> </key> + <value> + <tuple/> + </value> + </item> + <item> + <key> <string>version</string> </key> + <value> <string>erp5</string> </value> + </item> + <item> + <key> <string>workflow_history</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="2" aka="AAAAAAAAAAI="> + <pickle> + <global name="PersistentMapping" module="Persistence.mapping"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>data</string> </key> + <value> + <dictionary> + <item> + <key> <string>component_validation_workflow</string> </key> + <value> + <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> + </value> + </item> + </dictionary> + </value> + </item> + </dictionary> + </pickle> + </record> + <record id="3" aka="AAAAAAAAAAM="> + <pickle> + <global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/> + </pickle> + <pickle> + <dictionary> + <item> + <key> <string>_log</string> </key> + <value> + <list> + <dictionary> + <item> + <key> <string>action</string> </key> + <value> <string>validate</string> </value> + </item> + <item> + <key> <string>validation_state</string> </key> + <value> <string>validated</string> </value> + </item> + </dictionary> + </list> + </value> + </item> + </dictionary> + </pickle> + </record> +</ZopeData> diff --git a/product/ERP5/bootstrap/erp5_core/bt/template_tool_component_id_list b/product/ERP5/bootstrap/erp5_core/bt/template_tool_component_id_list index 9816bb52f551741fc3a68482861f4268139be08e..a1bbaf02a35180346cb0a4e26ed7f4a8334111b4 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/template_tool_component_id_list +++ b/product/ERP5/bootstrap/erp5_core/bt/template_tool_component_id_list @@ -1,3 +1,4 @@ tool.erp5.CallableTool tool.erp5.DiffTool +tool.erp5.RuleTool tool.erp5.SimulationTool \ No newline at end of file diff --git a/product/ERP5/dtml/explainRuleTool.dtml b/product/ERP5/dtml/explainRuleTool.dtml deleted file mode 100644 index 225487631fdb4a0975ca222acd577debca69e450..0000000000000000000000000000000000000000 --- a/product/ERP5/dtml/explainRuleTool.dtml +++ /dev/null @@ -1,6 +0,0 @@ -<dtml-var manage_page_header> -<dtml-var manage_tabs> - -<p>Rule Tool contains Rules</p> - -<dtml-var manage_page_footer>