Commit d2f87fd8 authored by Arnaud Fontaine's avatar Arnaud Fontaine

ZODB Components: Migrate Tools in Products.ERP5.Tool to erp5_core.

Besides migrating Tools .py, this also moves the Tools themselves (portal_*):
 * Some of them were created before erp5_core being installed and this
   would not work anymore as their .py is now in erp5_core.
 * Some others were created after (via setupLastTool()) and this would not
   work neither as sub-objects may be installed by erp5_core.

Add them to template_keep_path_list to prevent them from being re-created like
ERP5Site.addERP5Tool() used to do (depend on 3180424b, 91393be2).

Not migrated:
  * AlarmTool: Needed for upgrader.
  * CategoryTool, IdTool: Bootstrap.
  * TemplateTool, TrashTool: Business Template installation.
  * SolverTool: TypeProvider.
  * ContributionTool: Imported by Products.ERP5.Document.Document used in many places, will be done later.
  * NotificationTool: Imported by ERP5.Document.EmailDocument, will be done later.
parent 248f59e5
Pipeline #10074 failed with stage
in 0 seconds
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
############################################################################## ##############################################################################
import glob, os, subprocess, sys import glob, os, subprocess, sys
import Products.ERP5
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Globals import InitializeClass
...@@ -36,10 +37,10 @@ from Products.ERP5Type import Permissions ...@@ -36,10 +37,10 @@ from Products.ERP5Type import Permissions
from Products.PageTemplates.PageTemplateFile import PageTemplateFile from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from zLOG import LOG, INFO from zLOG import LOG, INFO
def popenCommunicate(command_list, input=None, **kwargs): def popenCommunicate(command_list, input_=None, **kwargs):
kwargs.update(stdout=subprocess.PIPE, stderr=subprocess.STDOUT) kwargs.update(stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
popen = subprocess.Popen(command_list, **kwargs) popen = subprocess.Popen(command_list, **kwargs)
result = popen.communicate(input)[0] result = popen.communicate(input_)[0]
if popen.returncode is None: if popen.returncode is None:
popen.kill() popen.kill()
if popen.returncode != 0: if popen.returncode != 0:
...@@ -150,8 +151,8 @@ class CertificateAuthorityTool(BaseTool): ...@@ -150,8 +151,8 @@ class CertificateAuthorityTool(BaseTool):
#'Edit' option form #'Edit' option form
manage_editCertificateAuthorityToolForm = PageTemplateFile( manage_editCertificateAuthorityToolForm = PageTemplateFile(
'../www/CertificateAuthorityTool_editPropertyList', os.path.join(os.path.dirname(Products.ERP5.__file__), 'www',
globals(), 'CertificateAuthorityTool_editPropertyList'),
__name__='manage_editCertificateAuthorityToolForm') __name__='manage_editCertificateAuthorityToolForm')
security.declareProtected(Permissions.ManageProperties, security.declareProtected(Permissions.ManageProperties,
...@@ -224,7 +225,7 @@ class CertificateAuthorityTool(BaseTool): ...@@ -224,7 +225,7 @@ class CertificateAuthorityTool(BaseTool):
for p in key, csr, cert: for p in key, csr, cert:
if os.path.exists(p): if os.path.exists(p):
os.unlink(p) os.unlink(p)
except: except Exception:
# do not raise during cleanup # do not raise during cleanup
pass pass
raise e[0], e[1], e[2] raise e[0], e[1], e[2]
...@@ -267,7 +268,7 @@ class CertificateAuthorityTool(BaseTool): ...@@ -267,7 +268,7 @@ class CertificateAuthorityTool(BaseTool):
for p in created: for p in created:
if os.path.exists(p): if os.path.exists(p):
os.unlink(p) os.unlink(p)
except: except Exception:
# do not raise during cleanup # do not raise during cleanup
pass pass
raise e[0], e[1], e[2] raise e[0], e[1], e[2]
......
<?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>CertificateAuthorityTool</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Tool.CertificateAuthorityTool</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>tool.erp5.CertificateAuthorityTool</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>
tool.erp5.CertificateAuthorityTool
\ No newline at end of file
...@@ -2821,7 +2821,11 @@ class BusinessTemplateMixin(ERP5TypeTestCase, LogInterceptor): ...@@ -2821,7 +2821,11 @@ class BusinessTemplateMixin(ERP5TypeTestCase, LogInterceptor):
'template_portal_type_allowed_content_type_list', 'template_portal_type_allowed_content_type_list',
'template_portal_type_hidden_content_type_list', 'template_portal_type_hidden_content_type_list',
'template_portal_type_property_sheet_list', 'template_portal_type_property_sheet_list',
'template_portal_type_base_category_list'): 'template_portal_type_base_category_list',
# test_20_checkUpdateTool recreates portal_simulation
'template_tool_component_id_list',
'template_keep_path_list',
'template_tool_id_list'):
continue continue
if prop_type == 'text' or prop_type == 'string': if prop_type == 'text' or prop_type == 'string':
prop_dict[pid] = '' prop_dict[pid] = ''
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Interface Component" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>default_reference</string> </key>
<value> <string>IUrlRegistryTool</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.interfaces.url_registry_tool</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>interface.erp5.IUrlRegistryTool</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Interface 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>
...@@ -51,7 +51,7 @@ class UrlRegistryTool(BaseTool): ...@@ -51,7 +51,7 @@ class UrlRegistryTool(BaseTool):
_url_reference_mapping = 'url_reference_mapping' _url_reference_mapping = 'url_reference_mapping'
def __init__(self, id=None): def __init__(self, id=None): # pylint: disable=redefined-builtin, super-init-not-called
if id is not None: if id is not None:
self.id = id self.id = id
self._initBTree() self._initBTree()
......
<?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>UrlRegistryTool</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Tool.UrlRegistryTool</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>tool.erp5.UrlRegistryTool</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>
interface.erp5.IUrlRegistryTool
\ No newline at end of file
tool.erp5.UrlRegistryTool
\ No newline at end of file
<?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>GadgetTool</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Tool.GadgetTool</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>tool.erp5.GadgetTool</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>
tool.erp5.GadgetTool
\ No newline at end of file
...@@ -2049,17 +2049,6 @@ class ERP5Generator(PortalGenerator): ...@@ -2049,17 +2049,6 @@ class ERP5Generator(PortalGenerator):
os.path.join(bt_path, 'PortalTypeAllowedContentTypeTemplateItem', 'allowed_content_types.xml') os.path.join(bt_path, 'PortalTypeAllowedContentTypeTemplateItem', 'allowed_content_types.xml')
).iterfind("portal_type[@id='%s']/*" % portal_type)] ).iterfind("portal_type[@id='%s']/*" % portal_type)]
def setupLastTools(self, p, **kw):
"""
Set up finals tools
We want to set the activity tool only at the end to
make sure that we do not put un the queue the full reindexation
"""
addERP5Tool(p, 'portal_rules', 'Rule Tool')
addERP5Tool(p, 'portal_simulation', 'Simulation Tool')
addERP5Tool(p, 'portal_deliveries', 'Delivery Tool')
addERP5Tool(p, 'portal_orders', 'Order Tool')
def setupTemplateTool(self, p, **kw): def setupTemplateTool(self, p, **kw):
""" """
Setup the Template Tool. Security must be set strictly. Setup the Template Tool. Security must be set strictly.
...@@ -2098,16 +2087,10 @@ class ERP5Generator(PortalGenerator): ...@@ -2098,16 +2087,10 @@ class ERP5Generator(PortalGenerator):
# Add ERP5 Tools # Add ERP5 Tools
addERP5Tool(p, 'portal_categories', 'Category Tool') addERP5Tool(p, 'portal_categories', 'Category Tool')
addERP5Tool(p, 'portal_ids', 'Id Tool')
if not p.hasObject('portal_templates'): if not p.hasObject('portal_templates'):
self.setupTemplateTool(p) self.setupTemplateTool(p)
addERP5Tool(p, 'portal_trash', 'Trash Tool') addERP5Tool(p, 'portal_trash', 'Trash Tool')
addERP5Tool(p, 'portal_alarms', 'Alarm Tool') addERP5Tool(p, 'portal_alarms', 'Alarm Tool')
addERP5Tool(p, 'portal_domains', 'Domain Tool')
addERP5Tool(p, 'portal_tests', 'Test Tool')
addERP5Tool(p, 'portal_password', 'Password Tool')
addERP5Tool(p, 'portal_introspections', 'Introspection Tool')
addERP5Tool(p, 'portal_acknowledgements', 'Acknowledgement Tool')
# Add ERP5Type Tool # Add ERP5Type Tool
addERP5Tool(p, 'portal_caches', 'Cache Tool') addERP5Tool(p, 'portal_caches', 'Cache Tool')
...@@ -2394,8 +2377,6 @@ class ERP5Generator(PortalGenerator): ...@@ -2394,8 +2377,6 @@ class ERP5Generator(PortalGenerator):
# Make sure the cache is initialized # Make sure the cache is initialized
p.portal_caches.updateCache() p.portal_caches.updateCache()
self.setupLastTools(p, **kw)
# Make sure tools are cleanly indexed with a uid before creating children # Make sure tools are cleanly indexed with a uid before creating children
# XXX for some strange reason, member was indexed 5 times # XXX for some strange reason, member was indexed 5 times
if not update: if not update:
......
...@@ -42,12 +42,9 @@ product_path = package_home( globals() ) ...@@ -42,12 +42,9 @@ product_path = package_home( globals() )
# Define object classes and tools # Define object classes and tools
from Tool import CategoryTool, IdTool, TemplateTool,\ from Tool import CategoryTool, IdTool, TemplateTool,\
TestTool, DomainTool, AlarmTool,\ AlarmTool,\
TrashTool, ContributionTool, NotificationTool, PasswordTool,\ TrashTool, ContributionTool, NotificationTool,\
GadgetTool, ContributionRegistryTool, IntrospectionTool,\ SolverTool
AcknowledgementTool, SolverTool,\
UrlRegistryTool,\
CertificateAuthorityTool
import ERP5Site import ERP5Site
from Document import PythonScript, SQLMethod from Document import PythonScript, SQLMethod
object_classes = ( ERP5Site.ERP5Site, object_classes = ( ERP5Site.ERP5Site,
...@@ -58,19 +55,10 @@ portal_tools = ( CategoryTool.CategoryTool, ...@@ -58,19 +55,10 @@ portal_tools = ( CategoryTool.CategoryTool,
IdTool.IdTool, IdTool.IdTool,
TemplateTool.TemplateTool, TemplateTool.TemplateTool,
AlarmTool.AlarmTool, AlarmTool.AlarmTool,
DomainTool.DomainTool,
TestTool.TestTool,
TrashTool.TrashTool, TrashTool.TrashTool,
PasswordTool.PasswordTool,
ContributionTool.ContributionTool, ContributionTool.ContributionTool,
NotificationTool.NotificationTool, NotificationTool.NotificationTool,
GadgetTool.GadgetTool,
ContributionRegistryTool.ContributionRegistryTool,
IntrospectionTool.IntrospectionTool,
AcknowledgementTool.AcknowledgementTool,
SolverTool.SolverTool, SolverTool.SolverTool,
UrlRegistryTool.UrlRegistryTool,
CertificateAuthorityTool.CertificateAuthorityTool,
) )
content_classes = () content_classes = ()
content_constructors = () content_constructors = ()
......
...@@ -27,11 +27,9 @@ ...@@ -27,11 +27,9 @@
# #
############################################################################## ##############################################################################
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type.Globals import InitializeClass, DTMLFile from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type.Tool.BaseTool import BaseTool from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ERP5 import _dtmldir
from zLOG import LOG
from DateTime import DateTime from DateTime import DateTime
from Products.ZSQLCatalog.SQLCatalog import Query, NegatedQuery from Products.ZSQLCatalog.SQLCatalog import Query, NegatedQuery
...@@ -61,7 +59,6 @@ class AcknowledgementTool(BaseTool): ...@@ -61,7 +59,6 @@ class AcknowledgementTool(BaseTool):
# Declarative Security # Declarative Security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declarePublic('countUnread') security.declarePublic('countUnread')
def countUnread(self, *args, **kw): def countUnread(self, *args, **kw):
""" """
......
<?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>AcknowledgementTool</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Tool.AcknowledgementTool</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>tool.erp5.AcknowledgementTool</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>
<?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>ContributionRegistryTool</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Tool.ContributionRegistryTool</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>tool.erp5.ContributionRegistryTool</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>
...@@ -29,45 +29,39 @@ ...@@ -29,45 +29,39 @@
from collections import defaultdict from collections import defaultdict
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type.Globals import InitializeClass, DTMLFile from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ERP5 import _dtmldir
from Products.ERP5Type.Tool.BaseTool import BaseTool from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ZSQLCatalog.SQLCatalog import SimpleQuery, ComplexQuery from Products.ZSQLCatalog.SQLCatalog import SimpleQuery, ComplexQuery
from zLOG import LOG
from DateTime import DateTime
_MARKER = [] _MARKER = ()
class DomainTool(BaseTool): class DomainTool(BaseTool):
""" """
A tool to define reusable ranges and subranges through A tool to define reusable ranges and subranges through
predicate trees predicate trees
""" """
id = 'portal_domains' id = 'portal_domains'
meta_type = 'ERP5 Domain Tool' meta_type = 'ERP5 Domain Tool'
portal_type = 'Domain Tool' portal_type = 'Domain Tool'
allowed_types = ('ERP5 Domain', ) allowed_types = ('ERP5 Domain', )
# Declarative Security
security = ClassSecurityInfo()
security.declareProtected(Permissions.ManagePortal, 'manage_overview') # Declarative Security
manage_overview = DTMLFile('explainDomainTool', _dtmldir) security = ClassSecurityInfo()
# XXX FIXME method should not be public # XXX FIXME method should not be public
# (some users are not able to see resource's price) # (some users are not able to see resource's price)
security.declarePublic('searchPredicateList') security.declarePublic('searchPredicateList')
def searchPredicateList(self, *args, **kw): def searchPredicateList(self, *args, **kw):
return self._searchPredicateList(restricted=True, *args, **kw) return self._searchPredicateList(restricted=True, *args, **kw)
def _searchPredicateList(self, context, test=1, sort_method=None, def _searchPredicateList(self, context, test=1, sort_method=None,
ignored_category_list=None, ignored_category_list=None,
tested_base_category_list=None, tested_base_category_list=None,
filter_method=None, acquired=1, filter_method=None, acquired=1,
sort_key_method=None, query=None, sort_key_method=None, query=None,
restricted=False, **kw): restricted=False, **kw):
""" """
Search all predicates which corresponds to this particular Search all predicates which corresponds to this particular
context. context.
...@@ -88,35 +82,35 @@ class DomainTool(BaseTool): ...@@ -88,35 +82,35 @@ class DomainTool(BaseTool):
- the acquired parameter allows to define if we want to use - the acquired parameter allows to define if we want to use
acquisition for categories. By default we want. acquisition for categories. By default we want.
""" """
if not kw.pop('strict', True): if not kw.pop('strict', True):
raise ValueError('"strict" mode cannot be disabled anymore') raise ValueError('"strict" mode cannot be disabled anymore')
portal = self.getPortalObject() portal = self.getPortalObject()
portal_catalog = portal.portal_catalog portal_catalog = portal.portal_catalog
portal_categories = portal.portal_categories portal_categories = portal.portal_categories
# Search the columns of the predicate table # Search the columns of the predicate table
query_list = [] if query is None else [query] query_list = [] if query is None else [query]
for column in portal_catalog.getSQLCatalog().getTableColumnList('predicate'): for column in portal_catalog.getSQLCatalog().getTableColumnList('predicate'):
# Arbitrary suffix choice, this code expects COLUMN, COLUMN_range_min # Arbitrary suffix choice, this code expects COLUMN, COLUMN_range_min
# and COLUMN_range_max to be simultaneously present for ranged # and COLUMN_range_max to be simultaneously present for ranged
# properties. Only checking one suffix simplifies the code flow. # properties. Only checking one suffix simplifies the code flow.
if column.endswith('_range_min'): if column.endswith('_range_min'):
property_name = column[:-10] property_name = column[:-10]
# We have to check a range property # We have to check a range property
equality = 'predicate.' + property_name equality = 'predicate.' + property_name
range_min = equality + '_range_min' range_min = equality + '_range_min'
range_max = equality + '_range_max' range_max = equality + '_range_max'
value = context.getProperty(property_name) value = context.getProperty(property_name)
query = ComplexQuery( query = ComplexQuery(
SimpleQuery(**{equality: None}), SimpleQuery(**{equality: None}),
SimpleQuery(**{range_min: None}), SimpleQuery(**{range_min: None}),
SimpleQuery(**{range_max: None}), SimpleQuery(**{range_max: None}),
logical_operator='AND') logical_operator='AND')
if value is not None: if value is not None:
query = ComplexQuery( query = ComplexQuery(
query, query,
SimpleQuery(**{equality: value}), SimpleQuery(**{equality: value}),
ComplexQuery( ComplexQuery(
...@@ -135,125 +129,125 @@ class DomainTool(BaseTool): ...@@ -135,125 +129,125 @@ class DomainTool(BaseTool):
logical_operator='AND', logical_operator='AND',
), ),
logical_operator='OR', logical_operator='OR',
) )
query_list.append(query) query_list.append(query)
if tested_base_category_list != []: if tested_base_category_list != []:
# Add category selection # Add category selection
if tested_base_category_list is None: if tested_base_category_list is None:
if acquired: if acquired:
category_list = context.getAcquiredCategoryList() category_list = context.getAcquiredCategoryList()
else:
category_list = context.getCategoryList()
else: else:
if acquired: category_list = context.getCategoryList()
getter = context.getAcquiredCategoryMembershipList else:
if acquired:
getter = context.getAcquiredCategoryMembershipList
else:
getter = context.getCategoryMembershipList
category_list = []
extend = category_list.extend
for tested_base_category in tested_base_category_list:
if portal_categories.get(tested_base_category) is None:
raise ValueError('Unknown base category: %r' % (tested_base_category, ))
tested_category_list = getter(tested_base_category, base=1)
if tested_category_list:
extend(tested_category_list)
else: else:
getter = context.getCategoryMembershipList # Developer requested specific base categories, but context do not
category_list = [] # declare one of these. Skipping this criterion risks matching too
extend = category_list.extend # many predicates, breaking the system performance-wise. So let
for tested_base_category in tested_base_category_list: # developer know there is an unexpected situation by raising.
if portal_categories.get(tested_base_category) is None: raise ValueError('%r does not have any %r relation' % (
raise ValueError('Unknown base category: %r' % (tested_base_category, )) context.getPath(),
tested_category_list = getter(tested_base_category, base=1) tested_base_category,
if tested_category_list: ))
extend(tested_category_list) left_join_list = kw.get('left_join_list', [])[:]
else: inner_join_list = kw.get('inner_join_list', [])[:]
# Developer requested specific base categories, but context do not if category_list:
# declare one of these. Skipping this criterion risks matching too preferred_predicate_category_list = portal.portal_preferences.getPreferredPredicateCategoryList([])
# many predicates, breaking the system performance-wise. So let left_join_category_list = []
# developer know there is an unexpected situation by raising. inner_join_category_list = []
raise ValueError('%r does not have any %r relation' % ( for category in category_list:
context.getPath(), if portal_categories.getBaseCategoryId(category) in preferred_predicate_category_list:
tested_base_category, inner_join_category_list.append(category)
)) else:
left_join_list = kw.get('left_join_list', [])[:] left_join_category_list.append(category)
inner_join_list = kw.get('inner_join_list', [])[:] def onMissing(category):
if category_list: # BBB: ValueError would seem more appropriate here, but original code
preferred_predicate_category_list = portal.portal_preferences.getPreferredPredicateCategoryList([]) # was raising TypeError - and this is explicitely tested for.
left_join_category_list = [] raise TypeError('Unknown category: %r' % (category, ))
inner_join_category_list = [] def onInnerJoin(column_name):
for category in category_list: inner_join_list.append(column_name)
if portal_categories.getBaseCategoryId(category) in preferred_predicate_category_list: # Base category is part of preferred predicate categories, predicates
inner_join_category_list.append(category) # which ignore it are indexed with category_uid=0.
else: return SimpleQuery(**{column_name: 0})
left_join_category_list.append(category) query_list.append(portal_catalog.getCategoryParameterDict(
def onMissing(category): inner_join_category_list,
# BBB: ValueError would seem more appropriate here, but original code category_table='predicate_category',
# was raising TypeError - and this is explicitely tested for. onMissing=onMissing,
raise TypeError('Unknown category: %r' % (category, )) onJoin=onInnerJoin,
def onInnerJoin(column_name): ))
inner_join_list.append(column_name) def onLeftJoin(column_name):
# Base category is part of preferred predicate categories, predicates left_join_list.append(column_name)
# which ignore it are indexed with category_uid=0. # Base category is not part of preferred predicate categories,
return SimpleQuery(**{column_name: 0}) # predicates which ignore it get no predicate_category row inserted
query_list.append(portal_catalog.getCategoryParameterDict( # for it, so an SQL NULL appears, translating to None.
inner_join_category_list, return SimpleQuery(**{column_name: None})
category_table='predicate_category', query_list.append(portal_catalog.getCategoryParameterDict(
onMissing=onMissing,
onJoin=onInnerJoin,
))
def onLeftJoin(column_name):
left_join_list.append(column_name)
# Base category is not part of preferred predicate categories,
# predicates which ignore it get no predicate_category row inserted
# for it, so an SQL NULL appears, translating to None.
return SimpleQuery(**{column_name: None})
query_list.append(portal_catalog.getCategoryParameterDict(
left_join_category_list, left_join_category_list,
category_table='predicate_category', category_table='predicate_category',
onMissing=onMissing, onMissing=onMissing,
onJoin=onLeftJoin, onJoin=onLeftJoin,
)) ))
else:
# No category to match against, so predicates expecting any relation
# would not apply, so we can exclude these.
# Note: this relies on a special indexation mechanism for predicate
# categories, which inserts a base_category_uid=0 line when indexed
# predicate membership_criterion_category_list is empty.
base_category_uid_column = 'predicate_category.base_category_uid'
kw[base_category_uid_column] = 0
inner_join_list.append(base_category_uid_column)
kw['left_join_list'] = left_join_list
kw['inner_join_list'] = inner_join_list
if query_list:
kw['query'] = ComplexQuery(logical_operator='AND', *query_list)
if restricted:
sql_result_list = portal_catalog.searchResults(**kw)
else: else:
sql_result_list = portal_catalog.unrestrictedSearchResults(**kw) # No category to match against, so predicates expecting any relation
if kw.get('src__'): # would not apply, so we can exclude these.
return sql_result_list # Note: this relies on a special indexation mechanism for predicate
result_list = [] # categories, which inserts a base_category_uid=0 line when indexed
if sql_result_list: # predicate membership_criterion_category_list is empty.
if test: base_category_uid_column = 'predicate_category.base_category_uid'
cache = {} kw[base_category_uid_column] = 0
def isMemberOf(context, c, strict_membership): inner_join_list.append(base_category_uid_column)
if c in cache: kw['left_join_list'] = left_join_list
return cache[c] kw['inner_join_list'] = inner_join_list
cache[c] = result = portal_categories.isMemberOf( if query_list:
context, c, strict_membership=strict_membership) kw['query'] = ComplexQuery(logical_operator='AND', *query_list)
return result
for predicate in sql_result_list: if restricted:
predicate = predicate.getObject() sql_result_list = portal_catalog.searchResults(**kw)
if not test or predicate.test(context, tested_base_category_list, else:
isMemberOf=isMemberOf): sql_result_list = portal_catalog.unrestrictedSearchResults(**kw)
result_list.append(predicate) if kw.get('src__'):
if filter_method is not None: return sql_result_list
result_list = filter_method(result_list) result_list = []
if sort_key_method is not None: if sql_result_list:
result_list.sort(key=sort_key_method) if test:
elif sort_method is not None: cache = {}
result_list.sort(cmp=sort_method) def isMemberOf(context, c, strict_membership):
return result_list if c in cache:
return cache[c]
cache[c] = result = portal_categories.isMemberOf(
context, c, strict_membership=strict_membership)
return result
for predicate in sql_result_list:
predicate = predicate.getObject()
if not test or predicate.test(context, tested_base_category_list,
isMemberOf=isMemberOf):
result_list.append(predicate)
if filter_method is not None:
result_list = filter_method(result_list)
if sort_key_method is not None:
result_list.sort(key=sort_key_method)
elif sort_method is not None:
result_list.sort(cmp=sort_method)
return result_list
# XXX FIXME method should not be public # XXX FIXME method should not be public
# (some users are not able to see resource's price) # (some users are not able to see resource's price)
security.declarePublic('generateMappedValue') security.declarePublic('generateMappedValue')
def generateMappedValue(self, context, test=1, predicate_list=None, **kw): def generateMappedValue(self, context, test=1, predicate_list=None, **kw):
""" """
We will generate a mapped value with the list of all predicates We will generate a mapped value with the list of all predicates
found. found.
Let's say we have 3 predicates (in the order we want) like this: Let's say we have 3 predicates (in the order we want) like this:
...@@ -264,46 +258,46 @@ class DomainTool(BaseTool): ...@@ -264,46 +258,46 @@ class DomainTool(BaseTool):
predicate1, and the quantity of the Predicate2, because Predicate predicate1, and the quantity of the Predicate2, because Predicate
1 is the first one which defines a base_price and the Predicate2 1 is the first one which defines a base_price and the Predicate2
is the first one wich defines a quantity. is the first one wich defines a quantity.
""" """
# First get the list of predicates # First get the list of predicates
if predicate_list is None: if predicate_list is None:
predicate_list = self.searchPredicateList(context, test=test, **kw) predicate_list = self.searchPredicateList(context, test=test, **kw)
if len(predicate_list)==0: if len(predicate_list)==0:
# No predicate, return None # No predicate, return None
mapped_value = None mapped_value = None
else: else:
# Generate tempDeliveryCell # Generate tempDeliveryCell
mapped_value = self.getPortalObject().newContent(temp_object=True, mapped_value = self.getPortalObject().newContent(temp_object=True,
portal_type='Supply Cell', id='new_mapped_value') portal_type='Supply Cell', id='new_mapped_value')
mapped_value_property_dict = {} mapped_value_property_dict = {}
# Look for each property the first predicate which defines the # Look for each property the first predicate which defines the
# property # property
for predicate in predicate_list: for predicate in predicate_list:
getMappedValuePropertyList = getattr(predicate, getMappedValuePropertyList = getattr(predicate,
'getMappedValuePropertyList', None) 'getMappedValuePropertyList', None)
# searchPredicateList returns a list of any kind of predicate, which # searchPredicateList returns a list of any kind of predicate, which
# includes predicates not containing any mapped value (for exemple, # includes predicates not containing any mapped value (for exemple,
# domains). In such case, it has no meaning to handle them here. # domains). In such case, it has no meaning to handle them here.
# A better way would be to tell catalog not to provide us with those # A better way would be to tell catalog not to provide us with those
# extra object, but there is no simple way (many portal types inherit # extra object, but there is no simple way (many portal types inherit
# from MappedValue defining the accessor). # from MappedValue defining the accessor).
# Feel free to improve. # Feel free to improve.
if getMappedValuePropertyList is not None: if getMappedValuePropertyList is not None:
for mapped_value_property in predicate.getMappedValuePropertyList(): for mapped_value_property in predicate.getMappedValuePropertyList():
if not mapped_value_property_dict.has_key(mapped_value_property): if not mapped_value_property_dict.has_key(mapped_value_property):
value = predicate.getProperty(mapped_value_property) value = predicate.getProperty(mapped_value_property)
if value is not None: if value is not None:
mapped_value_property_dict[mapped_value_property] = value mapped_value_property_dict[mapped_value_property] = value
# Update mapped value # Update mapped value
mapped_value.edit(**mapped_value_property_dict) mapped_value.edit(**mapped_value_property_dict)
return mapped_value return mapped_value
# XXX FIXME method should not be public # XXX FIXME method should not be public
# (some users are not able to see resource's price) # (some users are not able to see resource's price)
security.declarePublic('generateMultivaluedMappedValue') security.declarePublic('generateMultivaluedMappedValue')
def generateMultivaluedMappedValue(self, context, test=1, def generateMultivaluedMappedValue(self, context, test=1,
predicate_list=None, **kw): predicate_list=None, **kw):
""" """
We will generate a mapped value with the list of all predicates We will generate a mapped value with the list of all predicates
found. found.
Let's say we have 3 predicates (in the order we want) like this: Let's say we have 3 predicates (in the order we want) like this:
...@@ -312,62 +306,60 @@ class DomainTool(BaseTool): ...@@ -312,62 +306,60 @@ class DomainTool(BaseTool):
Predicate 3 [ base_price3, additional_price3 , , , , , ] Predicate 3 [ base_price3, additional_price3 , , , , , ]
Our generated MappedValue will take all values for each property and put Our generated MappedValue will take all values for each property and put
them in lists, unless predicates define the same list of criterion categories them in lists, unless predicates define the same list of criterion categories
""" """
# First get the list of predicates # First get the list of predicates
if predicate_list is None: if predicate_list is None:
predicate_list = self.searchPredicateList(context, test=test, **kw) predicate_list = self.searchPredicateList(context, test=test, **kw)
if predicate_list: if predicate_list:
mapped_value_property_dict = defaultdict(list) mapped_value_property_dict = defaultdict(list)
# Look for each property the first predicate with unique criterion # Look for each property the first predicate with unique criterion
# categories which defines the property # categories which defines the property
for predicate in predicate_list: for predicate in predicate_list:
for mapped_value_property in predicate.getMappedValuePropertyList(): for mapped_value_property in predicate.getMappedValuePropertyList():
value = predicate.getProperty(mapped_value_property) value = predicate.getProperty(mapped_value_property)
if value is not None: if value is not None:
mapped_value_property_dict[mapped_value_property].append(value) mapped_value_property_dict[mapped_value_property].append(value)
mapped_value = self.getPortalObject().newContent(temp_object=True, mapped_value = self.getPortalObject().newContent(temp_object=True,
portal_type='Supply Cell', id='multivalued_mapped_value') portal_type='Supply Cell', id='multivalued_mapped_value')
mapped_value._setMappedValuePropertyList( mapped_value._setMappedValuePropertyList(
mapped_value_property_dict.keys()) mapped_value_property_dict.keys())
mapped_value.__dict__.update(mapped_value_property_dict) mapped_value.__dict__.update(mapped_value_property_dict)
return mapped_value return mapped_value
security.declareProtected(Permissions.AccessContentsInformation,
'getChildDomainValueList')
def getChildDomainValueList(self, parent, **kw):
"""
Return child domain objects already present adn thois generetaded dynamically
"""
# get static domain
object_list = list(parent.objectValues())
# get dynamic object generated from script
object_list.extend(parent.getDomainGeneratorList(**kw))
return object_list
security.declareProtected(Permissions.AccessContentsInformation,
'getChildDomainValueList')
def getChildDomainValueList(self, parent, **kw):
"""
Return child domain objects already present adn thois generetaded dynamically
"""
# get static domain
object_list = list(parent.objectValues())
# get dynamic object generated from script
object_list.extend(parent.getDomainGeneratorList(**kw))
return object_list
security.declareProtected(Permissions.AccessContentsInformation, security.declareProtected(Permissions.AccessContentsInformation,
'getDomainByPath') 'getDomainByPath')
def getDomainByPath(self, path, default=_MARKER): def getDomainByPath(self, path, default=_MARKER):
""" """
Return the domain object for a given path Return the domain object for a given path
""" """
path = path.split('/') path = path.split('/')
base_domain_id = path[0] base_domain_id = path[0]
if default is _MARKER: if default is _MARKER:
domain = self[base_domain_id] domain = self[base_domain_id]
else:
domain = self.get(base_domain_id, _MARKER)
if domain is _MARKER: return default
for depth, subdomain in enumerate(path[1:]):
domain_list = self.getChildDomainValueList(domain, depth=depth)
for d in domain_list:
if d.getId() == subdomain:
domain = d
break
else: else:
domain = self.get(base_domain_id, _MARKER)
if domain is _MARKER: return default if domain is _MARKER: return default
for depth, subdomain in enumerate(path[1:]): raise KeyError, subdomain
domain_list = self.getChildDomainValueList(domain, depth=depth) return domain
for d in domain_list:
if d.getId() == subdomain:
domain = d
break
else:
if domain is _MARKER: return default
raise KeyError, subdomain
return domain
InitializeClass(DomainTool) InitializeClass(DomainTool)
<?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>DomainTool</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Tool.DomainTool</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>tool.erp5.DomainTool</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>
...@@ -33,20 +33,18 @@ import tempfile ...@@ -33,20 +33,18 @@ import tempfile
import json import json
import tarfile import tarfile
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type.Globals import InitializeClass, DTMLFile from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type.Tool.BaseTool import BaseTool from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from AccessControl.SecurityManagement import setSecurityManager from AccessControl.SecurityManagement import setSecurityManager
from Products.ERP5 import _dtmldir
from Products.ERP5Type.Utils import _setSuperSecurityManager from Products.ERP5Type.Utils import _setSuperSecurityManager
from App.config import getConfiguration from App.config import getConfiguration
from AccessControl import Unauthorized
from Products.ERP5Type.Cache import CachingMethod from Products.ERP5Type.Cache import CachingMethod
from cgi import escape from cgi import escape
import logging import logging
_MARKER = [] _MARKER = ()
event_log = logging.getLogger() event_log = logging.getLogger()
access_log = logging.getLogger("access") access_log = logging.getLogger("access")
...@@ -120,9 +118,6 @@ class IntrospectionTool(LogMixin, BaseTool): ...@@ -120,9 +118,6 @@ class IntrospectionTool(LogMixin, BaseTool):
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareProtected(Permissions.ManagePortal, 'manage_overview')
manage_overview = DTMLFile('explainIntrospectionTool', _dtmldir )
# #
# Remote menu management # Remote menu management
# #
...@@ -151,7 +146,7 @@ class IntrospectionTool(LogMixin, BaseTool): ...@@ -151,7 +146,7 @@ class IntrospectionTool(LogMixin, BaseTool):
# Unlazyfy URLs and other lazy values so that it can be marshalled # Unlazyfy URLs and other lazy values so that it can be marshalled
result = {} result = {}
for key, action_list in erp5_menu_dict.items(): for key, action_list in erp5_menu_dict.items():
result[key] = map(lambda action:dict(action), action_list) result[key] = [ dict(action) for action in action_list ]
return result return result
...@@ -463,7 +458,7 @@ class IntrospectionTool(LogMixin, BaseTool): ...@@ -463,7 +458,7 @@ class IntrospectionTool(LogMixin, BaseTool):
""" """
business_template_dict = {} business_template_dict = {}
for installed in self.portal_templates.getInstalledBusinessTemplateList(): for installed in self.portal_templates.getInstalledBusinessTemplateList():
business_template_dict[installed.getTitle()] = installed.getRevision() business_template_dict[installed.getTitle()] = installed.getRevision()
return business_template_dict return business_template_dict
security.declareProtected(Permissions.ManagePortal, security.declareProtected(Permissions.ManagePortal,
......
<?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>IntrospectionTool</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Tool.IntrospectionTool</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>tool.erp5.IntrospectionTool</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>
...@@ -27,17 +27,13 @@ ...@@ -27,17 +27,13 @@
# #
############################################################################## ##############################################################################
import socket
import uuid import uuid
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type.Globals import InitializeClass, DTMLFile, get_request from Products.ERP5Type.Globals import InitializeClass, get_request
from Products.ERP5Type.Tool.BaseTool import BaseTool from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ERP5 import _dtmldir
from zLOG import LOG, INFO from zLOG import LOG, INFO
import time, random
from hashlib import md5
from DateTime import DateTime from DateTime import DateTime
from Products.ERP5Type.Message import translateString from Products.ERP5Type.Message import translateString
from Products.ERP5Type.Globals import PersistentMapping from Products.ERP5Type.Globals import PersistentMapping
...@@ -65,12 +61,10 @@ class PasswordTool(BaseTool): ...@@ -65,12 +61,10 @@ class PasswordTool(BaseTool):
# Declarative Security # Declarative Security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareProtected(Permissions.ManagePortal, 'manage_overview')
manage_overview = DTMLFile('explainPasswordTool', _dtmldir)
_expiration_day = 1 _expiration_day = 1
def __init__(self, id=None): def __init__(self, id=None): # pylint: disable=redefined-builtin
super(PasswordTool, self).__init__(id) super(PasswordTool, self).__init__(id)
self._password_request_dict = OOBTree() self._password_request_dict = OOBTree()
...@@ -239,8 +233,7 @@ class PasswordTool(BaseTool): ...@@ -239,8 +233,7 @@ class PasswordTool(BaseTool):
if not portal.portal_preferences.isAuthenticationPolicyEnabled(): if not portal.portal_preferences.isAuthenticationPolicyEnabled():
return [] return []
try: try:
register_user_login, expiration_date = self._password_request_dict[ register_user_login, _ = self._password_request_dict[password_key]
password_key]
except KeyError: except KeyError:
return [] return []
user_dict_list = portal.acl_users.searchUsers( user_dict_list = portal.acl_users.searchUsers(
......
<?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>PasswordTool</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Tool.PasswordTool</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>tool.erp5.PasswordTool</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>
...@@ -26,24 +26,17 @@ ...@@ -26,24 +26,17 @@
# #
############################################################################## ##############################################################################
import cStringIO
from webdav.client import Resource
from Products.CMFCore.utils import UniqueObject
from Acquisition import Implicit
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type.Globals import InitializeClass, DTMLFile, PersistentMapping from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type.Tool.BaseTool import BaseTool from Products.ERP5Type.Tool.BaseTool import BaseTool
from Products.ERP5Type import Permissions
from Products.ERP5 import _dtmldir
from zLOG import LOG
try: try:
from Products.ERP5Type.CopySupport import CopyContainer
from Products.Zelenium.zuite import Zuite from Products.Zelenium.zuite import Zuite
# CopyContainer must be before Zuite otherwise manage_afterAdd() is not
class TestTool (Zuite, BaseTool): # called on upgrade and uid is not set. See ERP5Type Folder import order
# comments.
class TestTool (CopyContainer, Zuite, BaseTool):
""" """
Container for fonctionnal tests. Container for fonctionnal tests.
""" """
...@@ -55,9 +48,6 @@ try: ...@@ -55,9 +48,6 @@ try:
# Declarative Security # Declarative Security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareProtected( Permissions.ManagePortal, 'manage_overview' )
manage_overview = DTMLFile( 'explainTestTool', _dtmldir )
security.declarePublic('getZeleniumVersion') security.declarePublic('getZeleniumVersion')
def getZeleniumVersion(self): def getZeleniumVersion(self):
"""Returns the version of the zelenium product """Returns the version of the zelenium product
...@@ -66,9 +56,9 @@ try: ...@@ -66,9 +56,9 @@ try:
# Override this method to force Zuite objects are recursed. # Override this method to force Zuite objects are recursed.
def _recurseListTestCases( self, result, prefix, ob ): def _recurseListTestCases( self, result, prefix, ob ):
for tcid, test_case in ob.objectItems(): for tcid, test_case in ob.objectItems():
if isinstance( test_case, Zuite ): if isinstance( test_case, Zuite ):
result.extend( test_case.listTestCases( result.extend( test_case.listTestCases(
prefix=prefix + ( tcid, ) ) ) prefix=prefix + ( tcid, ) ) )
# Override this method to produce ERP5-style reports. # Override this method to produce ERP5-style reports.
...@@ -97,7 +87,4 @@ except ImportError: ...@@ -97,7 +87,4 @@ except ImportError:
# Declarative Security # Declarative Security
security = ClassSecurityInfo() security = ClassSecurityInfo()
security.declareProtected( Permissions.ManagePortal, 'manage_overview' )
manage_overview = DTMLFile( 'explainTestTool', _dtmldir )
InitializeClass(TestTool) InitializeClass(TestTool)
<?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>TestTool</string> </value>
</item>
<item>
<key> <string>default_source_reference</string> </key>
<value> <string>Products.ERP5.Tool.TestTool</string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>tool.erp5.TestTool</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>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Acknowledgement Tool" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>portal_acknowledgements</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Delivery Tool" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>portal_deliveries</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Domain Tool" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>portal_domains</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Id Tool" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>portal_ids</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Introspection Tool" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>portal_introspections</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Order Tool" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>portal_orders</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Password Tool" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_password_request_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>portal_password</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Rule Tool" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_count</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_mt_index</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value>
</item>
<item>
<key> <string>_tree</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>portal_rules</string> </value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
<global name="OOBTree" module="BTrees.OOBTree"/>
</pickle>
<pickle>
<none/>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Simulation Tool" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_Access_contents_information_Permission</string> </key>
<value>
<tuple>
<string>Member</string>
<string>Auditor</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_Add_portal_content_Permission</string> </key>
<value>
<tuple>
<string>Member</string>
<string>Author</string>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>_View_Permission</string> </key>
<value>
<tuple>
<string>Manager</string>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>portal_simulation</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="Test Tool" module="erp5.portal_type"/>
</pickle>
<pickle>
<dictionary/>
</pickle>
</record>
</ZopeData>
...@@ -4,8 +4,8 @@ document.erp5.Delivery ...@@ -4,8 +4,8 @@ document.erp5.Delivery
document.erp5.DeliveryCell document.erp5.DeliveryCell
document.erp5.DeliveryLine document.erp5.DeliveryLine
document.erp5.Event document.erp5.Event
document.erp5.ImmobilisationDelivery
document.erp5.ImmobilisableItem document.erp5.ImmobilisableItem
document.erp5.ImmobilisationDelivery
document.erp5.ImmobilisationMovement document.erp5.ImmobilisationMovement
document.erp5.Inventory document.erp5.Inventory
document.erp5.InventoryCell document.erp5.InventoryCell
......
...@@ -16,4 +16,13 @@ portal_components ...@@ -16,4 +16,13 @@ portal_components
portal_transforms/** portal_transforms/**
portal_types/Applied Rule/view portal_types/Applied Rule/view
portal_types/Simulation Movement/view portal_types/Simulation Movement/view
portal_types/Simulation Tool/view portal_types/Simulation Tool/view
\ No newline at end of file portal_rules
portal_simulation
portal_deliveries
portal_orders
portal_domains
portal_tests
portal_password
portal_introspections
portal_acknowledgements
\ No newline at end of file
tool.erp5.AcknowledgementTool
tool.erp5.BuilderTool tool.erp5.BuilderTool
tool.erp5.CallableTool tool.erp5.CallableTool
tool.erp5.ContributionRegistryTool
tool.erp5.DeliveryTool tool.erp5.DeliveryTool
tool.erp5.DiffTool tool.erp5.DiffTool
tool.erp5.DomainTool
tool.erp5.IntrospectionTool
tool.erp5.OrderTool tool.erp5.OrderTool
tool.erp5.PasswordTool
tool.erp5.RuleTool tool.erp5.RuleTool
tool.erp5.SimulationTool tool.erp5.SimulationTool
\ No newline at end of file tool.erp5.TestTool
\ No newline at end of file
mimetypes_registry mimetypes_registry
portal_acknowledgements
portal_callables portal_callables
portal_contribution_registry portal_contribution_registry
portal_deliveries
portal_diff portal_diff
portal_domains
portal_ids
portal_introspections
portal_notifications portal_notifications
portal_orders
portal_password
portal_rules
portal_sessions portal_sessions
portal_simulation
portal_tests
portal_transforms portal_transforms
\ No newline at end of file
<dtml-var manage_page_header>
<dtml-var manage_tabs>
<h3> <code>portal_domains</code> Tool </h3>
<p> This tool manages trees of predicates.
</p>
<dtml-var manage_page_footer>
<dtml-var manage_page_header>
<dtml-var manage_tabs>
<h3>Introspection Tool</h3>
<p>
Introspection Tool provides both local and remote introspection.
</p>
<dtml-var manage_page_footer>
<dtml-var manage_page_header>
<dtml-var manage_tabs>
<p>Explain PasswordTool</p>
<dtml-var manage_page_footer>
<dtml-var manage_page_header>
<dtml-var manage_tabs>
<p>
Test Tool is a store of functional test suites.
The purpose of this tool is to help running test suites automatically.
Typically, Zelenium is used, and Zuite objects are put inside this tool.
</p>
<p>
You need to install Zelenium and restart Zope to use this tool.
</p>
<dtml-var manage_page_footer>
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