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
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Rafael Monnerat
erp5
Commits
ea53f23e
Commit
ea53f23e
authored
Aug 10, 2021
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New portal type: External Method
parent
3851acf2
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
1244 additions
and
6 deletions
+1244
-6
product/ERP5/Document/BusinessTemplate.py
product/ERP5/Document/BusinessTemplate.py
+1
-1
product/ERP5/Document/ExternalMethod.py
product/ERP5/Document/ExternalMethod.py
+77
-0
product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/External%20Method/filter_view.xml
...mplateItem/portal_types/External%20Method/filter_view.xml
+100
-0
product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/External%20Method/repository_history_view.xml
...ortal_types/External%20Method/repository_history_view.xml
+85
-0
product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/External%20Method/view.xml
...ctionTemplateItem/portal_types/External%20Method/view.xml
+85
-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/External%20Method.xml
...PortalTypeTemplateItem/portal_types/External%20Method.xml
+121
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ExternalMethod_view.xml
...mplateItem/portal_skins/erp5_core/ExternalMethod_view.xml
+159
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ExternalMethod_view/my_description.xml
...al_skins/erp5_core/ExternalMethod_view/my_description.xml
+78
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ExternalMethod_view/my_function.xml
...ortal_skins/erp5_core/ExternalMethod_view/my_function.xml
+84
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ExternalMethod_view/my_id.xml
...Item/portal_skins/erp5_core/ExternalMethod_view/my_id.xml
+78
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ExternalMethod_view/my_module.xml
.../portal_skins/erp5_core/ExternalMethod_view/my_module.xml
+84
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ExternalMethod_view/my_reference.xml
...rtal_skins/erp5_core/ExternalMethod_view/my_reference.xml
+78
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ExternalMethod_view/my_title.xml
...m/portal_skins/erp5_core/ExternalMethod_view/my_title.xml
+78
-0
product/ERP5/bootstrap/erp5_core/bt/template_action_path_list
...uct/ERP5/bootstrap/erp5_core/bt/template_action_path_list
+3
-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_property_sheets/PropertySheetTemplateItem/portal_property_sheets/ExternalMethod.xml
...eetTemplateItem/portal_property_sheets/ExternalMethod.xml
+66
-0
product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/ExternalMethod/function_property.xml
...rtal_property_sheets/ExternalMethod/function_property.xml
+26
-0
product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/ExternalMethod/module_property.xml
...portal_property_sheets/ExternalMethod/module_property.xml
+26
-0
product/ERP5/bootstrap/erp5_property_sheets/bt/template_property_sheet_id_list
...p/erp5_property_sheets/bt/template_property_sheet_id_list
+1
-0
product/ERP5Catalog/Document/ERP5Catalog.py
product/ERP5Catalog/Document/ERP5Catalog.py
+7
-5
No files found.
product/ERP5/Document/BusinessTemplate.py
View file @
ea53f23e
...
@@ -3109,7 +3109,7 @@ class CatalogMethodTemplateItem(ObjectTemplateItem):
...
@@ -3109,7 +3109,7 @@ class CatalogMethodTemplateItem(ObjectTemplateItem):
# If there is no filter archive and the the meta_type of the catalog
# If there is no filter archive and the the meta_type of the catalog
# method isn't one of the ERP5-ified Catalog Method Document, then
# method isn't one of the ERP5-ified Catalog Method Document, then
# set the filter to 0
# set the filter to 0
elif
method
.
meta_type
not
in
(
'ERP5 SQL Method'
,
'ERP5 Python Script
'
):
elif
not
method
.
meta_type
.
startswith
(
'ERP5
'
):
method
.
setFiltered
(
0
)
method
.
setFiltered
(
0
)
# backward compatibility
# backward compatibility
...
...
product/ERP5/Document/ExternalMethod.py
0 → 100644
View file @
ea53f23e
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2021 Nexedi SARL and Contributors. All Rights Reserved.
# Julien Muchembled <jm@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 advised 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
AccessControl
import
ClassSecurityInfo
from
Products.ExternalMethod.ExternalMethod
import
\
ExternalMethod
as
ZopeExternalMethod
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5.mixin.expression
import
ExpressionMixin
class
ExternalMethod
(
XMLObject
,
ZopeExternalMethod
,
ExpressionMixin
):
""" External Method for ERP5
"""
meta_type
=
'ERP5 External Method'
portal_type
=
'External Method'
add_permission
=
Permissions
.
AddPortalContent
# Declarative security
security
=
ClassSecurityInfo
()
security
.
declareObjectProtected
(
Permissions
.
AccessContentsInformation
)
#View content list, Force /view, Standart option in external methods
manage_options
=
(
XMLObject
.
manage_options
[
0
]
,
{
'icon'
:
''
,
'label'
:
'View'
,
'action'
:
'view'
}
)
+
ZopeExternalMethod
.
manage_options
# Declarative properties
property_sheets
=
(
PropertySheet
.
Base
,
PropertySheet
.
XMLObject
,
PropertySheet
.
CategoryCore
,
PropertySheet
.
DublinCore
,
PropertySheet
.
ExternalMethod
)
manage_edit
=
None
def
getModule
(
self
):
return
getattr
(
self
,
'_module'
,
None
)
def
_setModule
(
self
,
module
):
self
.
_module
=
module
def
getFunction
(
self
):
return
getattr
(
self
,
'_function'
,
None
)
def
_setFunction
(
self
,
function
):
self
.
_function
=
function
__call__
=
ZopeExternalMethod
.
__call__
product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/External%20Method/filter_view.xml
0 → 100644
View file @
ea53f23e
<?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>
filter_view
</string>
</value>
</item>
<item>
<key>
<string>
permissions
</string>
</key>
<value>
<tuple>
<string>
View
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Action Information
</string>
</value>
</item>
<item>
<key>
<string>
priority
</string>
</key>
<value>
<float>
3.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Filter
</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}/Method_viewFilter
</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.getParentValue().getPortalType() == \'Catalog\'
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/External%20Method/repository_history_view.xml
0 → 100644
View file @
ea53f23e
<?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>
<string></string>
</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>
repository_history_view
</string>
</value>
</item>
<item>
<key>
<string>
permissions
</string>
</key>
<value>
<tuple>
<string>
View
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Action Information
</string>
</value>
</item>
<item>
<key>
<string>
priority
</string>
</key>
<value>
<float>
10.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Repository History
</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}/Base_viewRepositoryHistory
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/ActionTemplateItem/portal_types/External%20Method/view.xml
0 → 100644
View file @
ea53f23e
<?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>
<string></string>
</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>
portal_type
</string>
</key>
<value>
<string>
Action Information
</string>
</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}/ExternalMethod_view
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/PortalTypeAllowedContentTypeTemplateItem/allowed_content_types.xml
View file @
ea53f23e
...
@@ -36,6 +36,7 @@
...
@@ -36,6 +36,7 @@
<item>
Python Script
</item>
<item>
Python Script
</item>
</portal_type>
</portal_type>
<portal_type
id=
"Catalog"
>
<portal_type
id=
"Catalog"
>
<item>
External Method
</item>
<item>
Python Script
</item>
<item>
Python Script
</item>
<item>
SQL Method
</item>
<item>
SQL Method
</item>
</portal_type>
</portal_type>
...
...
product/ERP5/bootstrap/erp5_core/PortalTypePropertySheetTemplateItem/property_sheet_list.xml
View file @
ea53f23e
...
@@ -41,6 +41,9 @@
...
@@ -41,6 +41,9 @@
<portal_type
id=
"Extension Component"
>
<portal_type
id=
"Extension Component"
>
<item>
SortIndex
</item>
<item>
SortIndex
</item>
</portal_type>
</portal_type>
<portal_type
id=
"External Method"
>
<item>
CatalogFilter
</item>
</portal_type>
<portal_type
id=
"Interface Component"
>
<portal_type
id=
"Interface Component"
>
<item>
SortIndex
</item>
<item>
SortIndex
</item>
</portal_type>
</portal_type>
...
...
product/ERP5/bootstrap/erp5_core/PortalTypeTemplateItem/portal_types/External%20Method.xml
0 → 100644
View file @
ea53f23e
<?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>
content_icon
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
factory
</string>
</key>
<value>
<string>
addPythonScript
</string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
External Method
</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>
portal_type
</string>
</key>
<value>
<string>
Base Type
</string>
</value>
</item>
<item>
<key>
<string>
type_class
</string>
</key>
<value>
<string>
ExternalMethod
</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>
<global
name=
"TranslationInformation"
module=
"Products.ERP5Type.TranslationProviderBase"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
domain_name
</string>
</key>
<value>
<none/>
</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>
<global
name=
"TranslationInformation"
module=
"Products.ERP5Type.TranslationProviderBase"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
domain_name
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
property_name
</string>
</key>
<value>
<string>
title
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ExternalMethod_view.xml
0 → 100644
View file @
ea53f23e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ERP5 Form"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_bind_names
</string>
</key>
<value>
<object>
<klass>
<global
name=
"NameAssignments"
module=
"Shared.DC.Scripts.Bindings"
/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key>
<string>
_asgns
</string>
</key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_objects
</string>
</key>
<value>
<tuple/>
</value>
</item>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
Base_edit
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
edit_order
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
enctype
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
group_list
</string>
</key>
<value>
<list>
<string>
left
</string>
<string>
right
</string>
<string>
center
</string>
<string>
bottom
</string>
<string>
hidden
</string>
</list>
</value>
</item>
<item>
<key>
<string>
groups
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
bottom
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
center
</string>
</key>
<value>
<list>
<string>
my_description
</string>
</list>
</value>
</item>
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
left
</string>
</key>
<value>
<list>
<string>
my_id
</string>
<string>
my_title
</string>
<string>
my_reference
</string>
</list>
</value>
</item>
<item>
<key>
<string>
right
</string>
</key>
<value>
<list>
<string>
my_module
</string>
<string>
my_function
</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ExternalMethod_view
</string>
</value>
</item>
<item>
<key>
<string>
method
</string>
</key>
<value>
<string>
POST
</string>
</value>
</item>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
ScriptPython_view
</string>
</value>
</item>
<item>
<key>
<string>
pt
</string>
</key>
<value>
<string>
form_view
</string>
</value>
</item>
<item>
<key>
<string>
row_length
</string>
</key>
<value>
<int>
4
</int>
</value>
</item>
<item>
<key>
<string>
stored_encoding
</string>
</key>
<value>
<string>
UTF-8
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
External Method
</string>
</value>
</item>
<item>
<key>
<string>
unicode_mode
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
update_action
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
update_action_title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ExternalMethod_view/my_description.xml
0 → 100644
View file @
ea53f23e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_description
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_view_mode_description
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ExternalMethod_view/my_function.xml
0 → 100644
View file @
ea53f23e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_function
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_string_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Function
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ExternalMethod_view/my_id.xml
0 → 100644
View file @
ea53f23e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_id
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_view_mode_id
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ExternalMethod_view/my_module.xml
0 → 100644
View file @
ea53f23e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_module
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_string_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Module
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ExternalMethod_view/my_reference.xml
0 → 100644
View file @
ea53f23e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_reference
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_view_mode_reference
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ExternalMethod_view/my_title.xml
0 → 100644
View file @
ea53f23e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_title
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
external_validator_failed
</string>
</key>
<value>
<string>
The input failed the external validator.
</string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
overrides
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
tales
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_view_mode_title
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/bt/template_action_path_list
View file @
ea53f23e
...
@@ -86,6 +86,9 @@ Domain | view
...
@@ -86,6 +86,9 @@ Domain | view
Dynamic Category Property | view
Dynamic Category Property | view
Extension Component | view
Extension Component | view
Extension Component | web_view
Extension Component | web_view
External Method | filter_view
External Method | repository_history_view
External Method | view
Folder | view
Folder | view
Id Tool | view
Id Tool | view
Interaction Workflow Interaction | view
Interaction Workflow Interaction | view
...
...
product/ERP5/bootstrap/erp5_core/bt/template_portal_type_allowed_content_type_list
View file @
ea53f23e
...
@@ -15,6 +15,7 @@ Cache Tool | Cache Factory
...
@@ -15,6 +15,7 @@ Cache Tool | Cache Factory
Callable Tool | PyData Script
Callable Tool | PyData Script
Callable Tool | Python Script
Callable Tool | Python Script
Catalog Tool | Catalog
Catalog Tool | Catalog
Catalog | External Method
Catalog | Python Script
Catalog | Python Script
Catalog | SQL Method
Catalog | SQL Method
Category Tool | Base Category
Category Tool | Base Category
...
...
product/ERP5/bootstrap/erp5_core/bt/template_portal_type_id_list
View file @
ea53f23e
...
@@ -47,6 +47,7 @@ Dynamic Category Property
...
@@ -47,6 +47,7 @@ Dynamic Category Property
ERP5 Form
ERP5 Form
Event
Event
Extension Component
Extension Component
External Method
Folder
Folder
Id Tool
Id Tool
Interaction Workflow
Interaction Workflow
...
...
product/ERP5/bootstrap/erp5_core/bt/template_portal_type_property_sheet_list
View file @
ea53f23e
...
@@ -12,6 +12,7 @@ Category Related Membership State Constraint | ConstraintType
...
@@ -12,6 +12,7 @@ Category Related Membership State Constraint | ConstraintType
Content Existence Constraint | ConstraintType
Content Existence Constraint | ConstraintType
Document Component | SortIndex
Document Component | SortIndex
Extension Component | SortIndex
Extension Component | SortIndex
External Method | CatalogFilter
Interface Component | SortIndex
Interface Component | SortIndex
Mixin Component | SortIndex
Mixin Component | SortIndex
Module Component | SortIndex
Module Component | SortIndex
...
...
product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/ExternalMethod.xml
0 → 100644
View file @
ea53f23e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Property Sheet"
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>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ExternalMethod
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Property Sheet
</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>
product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/ExternalMethod/function_property.xml
0 → 100644
View file @
ea53f23e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
function_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/ExternalMethod/module_property.xml
0 → 100644
View file @
ea53f23e
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"Standard Property"
module=
"erp5.portal_type"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
module_property
</string>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_property_sheets/bt/template_property_sheet_id_list
View file @
ea53f23e
...
@@ -88,6 +88,7 @@ EquivalenceTester
...
@@ -88,6 +88,7 @@ EquivalenceTester
Event
Event
ExpressPreference
ExpressPreference
ExternalDocument
ExternalDocument
ExternalMethod
ExtraLocalRole
ExtraLocalRole
FlowCapacity
FlowCapacity
Folder
Folder
...
...
product/ERP5Catalog/Document/ERP5Catalog.py
View file @
ea53f23e
...
@@ -140,7 +140,7 @@ class ERP5Catalog(Folder, Catalog):
...
@@ -140,7 +140,7 @@ class ERP5Catalog(Folder, Catalog):
meta_type
=
"ERP5 Catalog"
meta_type
=
"ERP5 Catalog"
portal_type
=
'Catalog'
portal_type
=
'Catalog'
allowed_types
=
(
'Python Script'
,
'SQL Method'
,)
allowed_types
=
'External Method'
,
'Python Script'
,
'SQL Method'
#TODO(low priority): Add an icon to display at ERP5 Zope interface
#TODO(low priority): Add an icon to display at ERP5 Zope interface
icon
=
None
icon
=
None
# Activate isRADContent cause we need to generate accessors and default values
# Activate isRADContent cause we need to generate accessors and default values
...
@@ -185,6 +185,7 @@ class ERP5Catalog(Folder, Catalog):
...
@@ -185,6 +185,7 @@ class ERP5Catalog(Folder, Catalog):
"ERP5 SQL Method"
,
"ERP5 SQL Method"
,
)
)
HAS_FUNC_CODE_METATYPE_SET
=
(
HAS_FUNC_CODE_METATYPE_SET
=
(
"ERP5 External Method"
,
"ERP5 Python Script"
,
"ERP5 Python Script"
,
)
)
...
@@ -265,8 +266,8 @@ class ERP5Catalog(Folder, Catalog):
...
@@ -265,8 +266,8 @@ class ERP5Catalog(Folder, Catalog):
self
.
_baseSetSqlSearchResultKeysList
(
sorted
(
value
),
**
kw
)
self
.
_baseSetSqlSearchResultKeysList
(
sorted
(
value
),
**
kw
)
security
.
declarePublic
(
'getCatalogMethodIds'
)
security
.
declarePublic
(
'getCatalogMethodIds'
)
def
getCatalogMethodIds
(
self
,
def
getCatalogMethodIds
(
self
,
valid_method_meta_type_list
=
valid_method_meta_type_list
=
(
'ERP5 SQL Method'
,
'ERP5 Python Script'
)
):
HAS_ARGUMENT_SRC_METATYPE_SET
+
HAS_FUNC_CODE_METATYPE_SET
):
"""Find ERP5 SQL methods in the current folder and above
"""Find ERP5 SQL methods in the current folder and above
This function return a list of ids.
This function return a list of ids.
"""
"""
...
@@ -279,8 +280,9 @@ class ERP5Catalog(Folder, Catalog):
...
@@ -279,8 +280,9 @@ class ERP5Catalog(Folder, Catalog):
Returns a list of all python scripts available in
Returns a list of all python scripts available in
current sql catalog.
current sql catalog.
"""
"""
return
self
.
getCatalogMethodIds
(
return
self
.
getCatalogMethodIds
(
valid_method_meta_type_list
=
(
valid_method_meta_type_list
=
(
'ERP5 Python Script'
,))
'ERP5 External Method'
,
'ERP5 Python Script'
))
def
manage_catalogClear
(
self
,
REQUEST
=
None
,
RESPONSE
=
None
,
URL1
=
None
):
def
manage_catalogClear
(
self
,
REQUEST
=
None
,
RESPONSE
=
None
,
URL1
=
None
):
""" Clears the catalog
""" Clears the catalog
...
...
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