diff --git a/bt5/erp5_inotify/TestTemplateItem/portal_components/test.erp5.testInotifyTool.py b/bt5/erp5_inotify/TestTemplateItem/portal_components/test.erp5.testInotifyTool.py index 45c5bcbaa8c8f7b7eecab1d73b16dfa345933a9f..074a89fd61a2035fb20956910ddd33eb77cf10b0 100644 --- a/bt5/erp5_inotify/TestTemplateItem/portal_components/test.erp5.testInotifyTool.py +++ b/bt5/erp5_inotify/TestTemplateItem/portal_components/test.erp5.testInotifyTool.py @@ -33,7 +33,7 @@ from Products.ERP5.ERP5Site import addERP5Tool class TestInotifyTool(ERP5TypeTestCase): def test_inotify(self): - from Products.ERP5.Tool.InotifyTool import IN_CREATE, IN_MODIFY, IN_DELETE + from erp5.component.tool.InotifyTool import IN_CREATE, IN_MODIFY, IN_DELETE addERP5Tool(self.portal, 'portal_inotify', 'Inotify Tool') inotify_tool = self.portal.portal_inotify for inotify in inotify_tool.objectValues(): diff --git a/product/ERP5/Tool/InotifyTool.py b/bt5/erp5_inotify/ToolComponentTemplateItem/portal_components/tool.erp5.InotifyTool.py similarity index 96% rename from product/ERP5/Tool/InotifyTool.py rename to bt5/erp5_inotify/ToolComponentTemplateItem/portal_components/tool.erp5.InotifyTool.py index 7b8ac8d5f14cf6297d0950e7713cd6d085ed710c..29b156bfe665660d7ba322516c3123376b7e80a5 100644 --- a/product/ERP5/Tool/InotifyTool.py +++ b/bt5/erp5_inotify/ToolComponentTemplateItem/portal_components/tool.erp5.InotifyTool.py @@ -27,11 +27,9 @@ ############################################################################## import errno, glob, os, threading -from AccessControl import ClassSecurityInfo from Acquisition import aq_base from Products.ERP5Type.Tool.BaseTool import BaseTool from Products.ERP5Type.TransactionalVariable import TransactionalResource -from Products.ERP5Type import Permissions from Products.ERP5.mixin.timer_service import TimerServiceMixin from AccessControl.SecurityManagement import newSecurityManager, \ getSecurityManager, setSecurityManager @@ -61,7 +59,7 @@ class InotifyTool(TimerServiceMixin, BaseTool): except AttributeError: pass - def process_timer(self, tick, interval, prev="", next=""): + def process_timer(self, tick, interval, prev="", next=""): # pylint: disable=redefined-builtin if timerservice_lock.acquire(0): try: try: diff --git a/bt5/erp5_inotify/ToolComponentTemplateItem/portal_components/tool.erp5.InotifyTool.xml b/bt5/erp5_inotify/ToolComponentTemplateItem/portal_components/tool.erp5.InotifyTool.xml new file mode 100644 index 0000000000000000000000000000000000000000..a063ffcb92b7940cad8b51b7b8b750d1786588c9 --- /dev/null +++ b/bt5/erp5_inotify/ToolComponentTemplateItem/portal_components/tool.erp5.InotifyTool.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>InotifyTool</string> </value> + </item> + <item> + <key> <string>default_source_reference</string> </key> + <value> <string>Products.ERP5.Tool.InotifyTool</string> </value> + </item> + <item> + <key> <string>description</string> </key> + <value> + <none/> + </value> + </item> + <item> + <key> <string>id</string> </key> + <value> <string>tool.erp5.InotifyTool</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/bt5/erp5_inotify/bt/template_tool_component_id_list b/bt5/erp5_inotify/bt/template_tool_component_id_list new file mode 100644 index 0000000000000000000000000000000000000000..af78c3782085678dd6a0f32470759e1accf1a9e4 --- /dev/null +++ b/bt5/erp5_inotify/bt/template_tool_component_id_list @@ -0,0 +1 @@ +tool.erp5.InotifyTool \ No newline at end of file diff --git a/product/ERP5/__init__.py b/product/ERP5/__init__.py index adbaa1bd1f0deba44d1eda403b0d96302d667997..e1db2f0a5ced7f073eb560f6bcc5a8b2c6bc89f8 100644 --- a/product/ERP5/__init__.py +++ b/product/ERP5/__init__.py @@ -47,7 +47,7 @@ from Tool import CategoryTool, IdTool, TemplateTool,\ GadgetTool, ContributionRegistryTool, IntrospectionTool,\ AcknowledgementTool, SolverTool,\ UrlRegistryTool,\ - CertificateAuthorityTool, InotifyTool + CertificateAuthorityTool import ERP5Site from Document import PythonScript, SQLMethod object_classes = ( ERP5Site.ERP5Site, @@ -71,7 +71,6 @@ portal_tools = ( CategoryTool.CategoryTool, SolverTool.SolverTool, UrlRegistryTool.UrlRegistryTool, CertificateAuthorityTool.CertificateAuthorityTool, - InotifyTool.InotifyTool, ) content_classes = () content_constructors = ()