Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Binh
erp5
Commits
60c4d915
Commit
60c4d915
authored
Aug 30, 2019
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZODB Components: Add 'Tool Component' found in Products.XXX.Tool on FS.
parent
3a59ff76
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
317 additions
and
1 deletion
+317
-1
product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Tool%20Component/view.xml
...ActionTemplateItem/portal_types/Tool%20Component/view.xml
+96
-0
product/ERP5/bootstrap/erp5_core/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
...eAllowedContentTypeTemplateItem/allowed_content_types.xml
+1
-0
product/ERP5/bootstrap/erp5_core/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
...rtalTypePropertySheetTemplateItem/property_sheet_list.xml
+3
-0
product/ERP5/bootstrap/erp5_core/PortalTypeTemplateItem/portal_types/Tool%20Component.xml
.../PortalTypeTemplateItem/portal_types/Tool%20Component.xml
+137
-0
product/ERP5/bootstrap/erp5_core/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
...rtalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
+4
-0
product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/dynamic_class_generation_interaction_workflow/interactions/Component_modify.xml
...on_interaction_workflow/interactions/Component_modify.xml
+1
-0
product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/dynamic_class_generation_interaction_workflow/interactions/Component_reset.xml
...ion_interaction_workflow/interactions/Component_reset.xml
+1
-0
product/ERP5/bootstrap/erp5_core/bt/template_action_path_list
...uct/ERP5/bootstrap/erp5_core/bt/template_action_path_list
+1
-0
product/ERP5/bootstrap/erp5_core/bt/template_portal_type_allowed_content_type_list
...p5_core/bt/template_portal_type_allowed_content_type_list
+1
-0
product/ERP5/bootstrap/erp5_core/bt/template_portal_type_id_list
.../ERP5/bootstrap/erp5_core/bt/template_portal_type_id_list
+1
-0
product/ERP5/bootstrap/erp5_core/bt/template_portal_type_property_sheet_list
...rap/erp5_core/bt/template_portal_type_property_sheet_list
+1
-0
product/ERP5/bootstrap/erp5_core/bt/template_portal_type_workflow_chain_list
...rap/erp5_core/bt/template_portal_type_workflow_chain_list
+4
-1
product/ERP5Type/Core/ToolComponent.py
product/ERP5Type/Core/ToolComponent.py
+61
-0
product/ERP5Type/dynamic/dynamic_module.py
product/ERP5Type/dynamic/dynamic_module.py
+5
-0
No files found.
product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/Tool%20Component/view.xml
0 → 100644
View file @
60c4d915
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ActionInformation"
module=
"Products.CMFCore.ActionInformation"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
action
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
categories
</string>
</key>
<value>
<tuple>
<string>
action_type/object_view
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
category
</string>
</key>
<value>
<string>
object_view
</string>
</value>
</item>
<item>
<key>
<string>
condition
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
icon
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
view
</string>
</value>
</item>
<item>
<key>
<string>
permissions
</string>
</key>
<value>
<tuple>
<string>
View
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
priority
</string>
</key>
<value>
<float>
1.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
View
</string>
</value>
</item>
<item>
<key>
<string>
visible
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/ComponentMixin_view
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"Expression"
module=
"Products.CMFCore.Expression"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
python: object is not None and not object.isWebMode()
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
View file @
60c4d915
...
@@ -55,6 +55,7 @@
...
@@ -55,6 +55,7 @@
<item>
Mixin Component
</item>
<item>
Mixin Component
</item>
<item>
Module Component
</item>
<item>
Module Component
</item>
<item>
Test Component
</item>
<item>
Test Component
</item>
<item>
Tool Component
</item>
</portal_type>
</portal_type>
<portal_type
id=
"Contribution Registry Tool"
>
<portal_type
id=
"Contribution Registry Tool"
>
<item>
Contribution Predicate
</item>
<item>
Contribution Predicate
</item>
...
...
product/ERP5/bootstrap/erp5_core/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
View file @
60c4d915
...
@@ -82,6 +82,9 @@
...
@@ -82,6 +82,9 @@
<portal_type
id=
"Test Component"
>
<portal_type
id=
"Test Component"
>
<item>
SortIndex
</item>
<item>
SortIndex
</item>
</portal_type>
</portal_type>
<portal_type
id=
"Tool Component"
>
<item>
SortIndex
</item>
</portal_type>
<portal_type
id=
"Trash Bin"
>
<portal_type
id=
"Trash Bin"
>
<item>
Base
</item>
<item>
Base
</item>
<item>
SimpleItem
</item>
<item>
SimpleItem
</item>
...
...
product/ERP5/bootstrap/erp5_core/PortalTypeTemplateItem/portal_types/Tool%20Component.xml
0 → 100644
View file @
60c4d915
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Base Type"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_property_domain_dict
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
short_title
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
acquire_local_roles
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
content_icon
</string>
</key>
<value>
<string>
web_page.png
</string>
</value>
</item>
<item>
<key>
<string>
content_meta_type
</string>
</key>
<value>
<string>
ERP5 Text Document
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
A Tool Component as used to be found in Products.XXX.Tool
</string>
</value>
</item>
<item>
<key>
<string>
factory
</string>
</key>
<value>
<string>
addDocumentComponent
</string>
</value>
</item>
<item>
<key>
<string>
filter_content_types
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
group_list
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Tool Component
</string>
</value>
</item>
<item>
<key>
<string>
init_script
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
permission
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
type_class
</string>
</key>
<value>
<string>
ToolComponent
</string>
</value>
</item>
<item>
<key>
<string>
type_interface
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
type_mixin
</string>
</key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<tuple>
<global
name=
"TranslationInformation"
module=
"Products.ERP5Type.TranslationProviderBase"
/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
domain_name
</string>
</key>
<value>
<string>
erp5_content
</string>
</value>
</item>
<item>
<key>
<string>
property_name
</string>
</key>
<value>
<string>
short_title
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<tuple>
<global
name=
"TranslationInformation"
module=
"Products.ERP5Type.TranslationProviderBase"
/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
domain_name
</string>
</key>
<value>
<string>
erp5_content
</string>
</value>
</item>
<item>
<key>
<string>
property_name
</string>
</key>
<value>
<string>
title
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
View file @
60c4d915
...
@@ -179,4 +179,8 @@
...
@@ -179,4 +179,8 @@
<type>
Test Component
</type>
<type>
Test Component
</type>
<workflow>
component_validation_workflow, dynamic_class_generation_interaction_workflow, edit_workflow
</workflow>
<workflow>
component_validation_workflow, dynamic_class_generation_interaction_workflow, edit_workflow
</workflow>
</chain>
</chain>
<chain>
<type>
Tool Component
</type>
<workflow>
component_validation_workflow, dynamic_class_generation_interaction_workflow, edit_workflow
</workflow>
</chain>
</workflow_chain>
</workflow_chain>
\ No newline at end of file
product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/dynamic_class_generation_interaction_workflow/interactions/Component_modify.xml
View file @
60c4d915
...
@@ -76,6 +76,7 @@
...
@@ -76,6 +76,7 @@
<string>
Mixin Component
</string>
<string>
Mixin Component
</string>
<string>
Module Component
</string>
<string>
Module Component
</string>
<string>
Test Component
</string>
<string>
Test Component
</string>
<string>
Tool Component
</string>
</list>
</list>
</value>
</value>
</item>
</item>
...
...
product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/dynamic_class_generation_interaction_workflow/interactions/Component_reset.xml
View file @
60c4d915
...
@@ -75,6 +75,7 @@
...
@@ -75,6 +75,7 @@
<string>
Mixin Component
</string>
<string>
Mixin Component
</string>
<string>
Module Component
</string>
<string>
Module Component
</string>
<string>
Test Component
</string>
<string>
Test Component
</string>
<string>
Tool Component
</string>
</list>
</list>
</value>
</value>
</item>
</item>
...
...
product/ERP5/bootstrap/erp5_core/bt/template_action_path_list
View file @
60c4d915
...
@@ -148,6 +148,7 @@ Template Tool | upgrade_from_repository
...
@@ -148,6 +148,7 @@ Template Tool | upgrade_from_repository
Template Tool | view
Template Tool | view
Test Component | run_live_test
Test Component | run_live_test
Test Component | view
Test Component | view
Tool Component | view
Trash Bin | jump_bt5
Trash Bin | jump_bt5
Trash Bin | view
Trash Bin | view
Trash Folder | view
Trash Folder | view
...
...
product/ERP5/bootstrap/erp5_core/bt/template_portal_type_allowed_content_type_list
View file @
60c4d915
...
@@ -25,6 +25,7 @@ Component Tool | Interface Component
...
@@ -25,6 +25,7 @@ Component Tool | Interface Component
Component Tool | Mixin Component
Component Tool | Mixin Component
Component Tool | Module Component
Component Tool | Module Component
Component Tool | Test Component
Component Tool | Test Component
Component Tool | Tool Component
Contribution Registry Tool | Contribution Predicate
Contribution Registry Tool | Contribution Predicate
Domain Tool | Base Domain
Domain Tool | Base Domain
Domain | Domain
Domain | Domain
...
...
product/ERP5/bootstrap/erp5_core/bt/template_portal_type_id_list
View file @
60c4d915
...
@@ -86,6 +86,7 @@ TALES Constraint
...
@@ -86,6 +86,7 @@ TALES Constraint
Template Tool
Template Tool
Test Component
Test Component
Test Tool
Test Tool
Tool Component
Trash Bin
Trash Bin
Trash Folder
Trash Folder
Trash Tool
Trash Tool
...
...
product/ERP5/bootstrap/erp5_core/bt/template_portal_type_property_sheet_list
View file @
60c4d915
...
@@ -30,6 +30,7 @@ Simulation Movement | SortIndex
...
@@ -30,6 +30,7 @@ Simulation Movement | SortIndex
String Attribute Match Constraint | ConstraintType
String Attribute Match Constraint | ConstraintType
TALES Constraint | ConstraintType
TALES Constraint | ConstraintType
Test Component | SortIndex
Test Component | SortIndex
Tool Component | SortIndex
Trash Bin | Base
Trash Bin | Base
Trash Bin | SimpleItem
Trash Bin | SimpleItem
Trash Bin | Task
Trash Bin | Task
\ No newline at end of file
product/ERP5/bootstrap/erp5_core/bt/template_portal_type_workflow_chain_list
View file @
60c4d915
...
@@ -59,4 +59,7 @@ System Preference | preference_workflow
...
@@ -59,4 +59,7 @@ System Preference | preference_workflow
TALES Constraint | dynamic_class_generation_interaction_workflow
TALES Constraint | dynamic_class_generation_interaction_workflow
Test Component | component_validation_workflow
Test Component | component_validation_workflow
Test Component | dynamic_class_generation_interaction_workflow
Test Component | dynamic_class_generation_interaction_workflow
Test Component | edit_workflow
Test Component | edit_workflow
\ No newline at end of file
Tool Component | component_validation_workflow
Tool Component | dynamic_class_generation_interaction_workflow
Tool Component | edit_workflow
\ No newline at end of file
product/ERP5Type/Core/ToolComponent.py
0 → 100644
View file @
60c4d915
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2019 Nexedi SA and Contributors. All Rights Reserved.
# Arnaud Fontaine <arnaud.fontaine@nexedi.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#
##############################################################################
from
Products.ERP5Type.Core.DocumentComponent
import
DocumentComponent
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
import
zope.interface
from
Products.ERP5Type.interfaces.component
import
IComponent
class
ToolComponent
(
DocumentComponent
):
"""
ZODB Component for Tools, used to be found on Products.XXX.Tool on FS
"""
meta_type
=
'ERP5 Tool Component'
portal_type
=
'Tool Component'
zope
.
interface
.
implements
(
IComponent
)
security
=
ClassSecurityInfo
()
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
@
staticmethod
def
_getFilesystemPath
():
# TODO-arnau: useful?
raise
NotImplementedError
@
staticmethod
def
_getDynamicModuleNamespace
():
return
'erp5.component.tool'
@
staticmethod
def
getIdPrefix
():
return
'tool'
product/ERP5Type/dynamic/dynamic_module.py
View file @
60c4d915
...
@@ -188,6 +188,8 @@ def initializeDynamicModules():
...
@@ -188,6 +188,8 @@ def initializeDynamicModules():
holds Interface modules previously found in Products.NAME.interfaces
holds Interface modules previously found in Products.NAME.interfaces
erp5.component.mixin:
erp5.component.mixin:
holds Mixin modules previously found in Products.NAME.mixin
holds Mixin modules previously found in Products.NAME.mixin
erp5.component.Tool:
holds Tool modules previously found in Products.NAME.Tool
erp5.component.extension:
erp5.component.extension:
holds Extension modules previously found in bt5 in
holds Extension modules previously found in bt5 in
$INSTANCE_HOME/Extensions
$INSTANCE_HOME/Extensions
...
@@ -245,6 +247,9 @@ def initializeDynamicModules():
...
@@ -245,6 +247,9 @@ def initializeDynamicModules():
erp5
.
component
.
document
=
ComponentDynamicPackage
(
'erp5.component.document'
,
erp5
.
component
.
document
=
ComponentDynamicPackage
(
'erp5.component.document'
,
'Document Component'
)
'Document Component'
)
erp5
.
component
.
tool
=
ComponentDynamicPackage
(
'erp5.component.tool'
,
'Tool Component'
)
erp5
.
component
.
interface
=
ComponentDynamicPackage
(
'erp5.component.interface'
,
erp5
.
component
.
interface
=
ComponentDynamicPackage
(
'erp5.component.interface'
,
'Interface Component'
)
'Interface Component'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment