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
Paul Graydon
erp5
Commits
49de5527
Commit
49de5527
authored
Apr 16, 2021
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: ERP5Workflow: Worklist is a Predicate.
parent
0ff01552
Changes
25
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
1202 additions
and
848 deletions
+1202
-848
bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km/WebSite_getWorklistSettingsFor.py
...em/portal_skins/erp5_km/WebSite_getWorklistSettingsFor.py
+2
-5
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/ERP5Site_getTicketWorkflowWorklistInfoDict.py
...ort_request/ERP5Site_getTicketWorkflowWorklistInfoDict.py
+4
-4
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Worklist_getCriterionPropertyItemList.py
..._skins/erp5_core/Worklist_getCriterionPropertyItemList.py
+13
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Worklist_getCriterionPropertyItemList.xml
...skins/erp5_core/Worklist_getCriterionPropertyItemList.xml
+62
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Worklist_view.xml
...SkinTemplateItem/portal_skins/erp5_core/Worklist_view.xml
+27
-6
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Worklist_view/listbox.xml
...lateItem/portal_skins/erp5_core/Worklist_view/listbox.xml
+464
-41
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Worklist_view/listbox_identity.xml
...portal_skins/erp5_core/Worklist_view/listbox_identity.xml
+298
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Worklist_view/my_action_type.xml
...m/portal_skins/erp5_core/Worklist_view/my_action_type.xml
+13
-6
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Worklist_view/my_action_type2.xml
.../portal_skins/erp5_core/Worklist_view/my_action_type2.xml
+8
-45
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Worklist_view/my_criterion_property_list.xml
...ns/erp5_core/Worklist_view/my_criterion_property_list.xml
+271
-0
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Worklist_view/my_matched_causality_state_list.xml
...p5_core/Worklist_view/my_matched_causality_state_list.xml
+0
-126
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Worklist_view/my_matched_simulation_state_list.xml
...5_core/Worklist_view/my_matched_simulation_state_list.xml
+0
-126
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Worklist_view/my_matched_validation_state_list.xml
...5_core/Worklist_view/my_matched_validation_state_list.xml
+0
-126
product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/Worklist.xml
...ertySheetTemplateItem/portal_property_sheets/Worklist.xml
+0
-66
product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/Worklist/matched_causality_state_property.xml
...erty_sheets/Worklist/matched_causality_state_property.xml
+0
-46
product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/Worklist/matched_portal_type_property.xml
...property_sheets/Worklist/matched_portal_type_property.xml
+0
-48
product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/Worklist/matched_simulation_state_property.xml
...rty_sheets/Worklist/matched_simulation_state_property.xml
+0
-48
product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/Worklist/matched_validation_state_property.xml
...rty_sheets/Worklist/matched_validation_state_property.xml
+0
-48
product/ERP5/bootstrap/erp5_property_sheets/bt/template_property_sheet_id_list
...p/erp5_property_sheets/bt/template_property_sheet_id_list
+1
-2
product/ERP5Type/Core/Workflow.py
product/ERP5Type/Core/Workflow.py
+2
-17
product/ERP5Type/Core/Worklist.py
product/ERP5Type/Core/Worklist.py
+20
-56
product/ERP5Type/Tool/PropertySheetTool.py
product/ERP5Type/Tool/PropertySheetTool.py
+1
-1
product/ERP5Type/Tool/WorkflowTool.py
product/ERP5Type/Tool/WorkflowTool.py
+4
-1
product/ERP5Type/mixin/guardable.py
product/ERP5Type/mixin/guardable.py
+10
-12
product/ERP5Type/patches/DCWorkflow.py
product/ERP5Type/patches/DCWorkflow.py
+2
-18
No files found.
bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km/WebSite_getWorklistSettingsFor.py
View file @
49de5527
...
...
@@ -4,8 +4,6 @@ It includes some copy / paste of code from DCWorkflow. Refactoring
needed through DCWorkflow API extension.
"""
kw
=
{}
# Try to access the workflow defined by the action
try
:
workflow_tool
=
context
.
portal_workflow
...
...
@@ -15,8 +13,7 @@ except AttributeError:
# If this is a worklist action, read the worklist definition
worklist
=
workflow
.
getWorklistValueByReference
(
action
[
'worklist_id'
])
for
varkey
in
worklist
.
getVarMatchKeys
():
kw
[
varkey
]
=
worklist
.
getVarMatch
(
varkey
)
kw
=
worklist
.
getIdentityCriterionDict
()
# Automatically filter workflists per portal type
# so that the same state can be used for different
...
...
bt5/erp5_officejs_support_request_ui/SkinTemplateItem/portal_skins/erp5_officejs_support_request/ERP5Site_getTicketWorkflowWorklistInfoDict.py
View file @
49de5527
...
...
@@ -13,9 +13,10 @@ workflow = portal.portal_workflow.ticket_workflow
workflow_state_var
=
workflow
.
variables
.
getStateVar
()
for
worklist
in
workflow
.
worklists
.
objectValues
():
identity_criterion_dict
=
worklist
.
getIdentityCriterionDict
()
if
portal_type
\
and
'portal_type'
in
worklist
.
get
VarMatchKeys
()
\
and
portal_type
not
in
worklist
.
getVarMatch
(
'portal_type'
):
and
'portal_type'
in
worklist
.
get
CriterionPropertyList
()
\
and
portal_type
not
in
identity_criterion_dict
.
get
(
'portal_type'
):
continue
query_list
=
[{
...
...
@@ -27,8 +28,7 @@ for worklist in workflow.worklists.objectValues():
'value'
:
role
,
}
for
role
in
worklist
.
getGuardRoleList
()]
}]
for
key
in
worklist
.
getVarMatchKeys
():
value
=
worklist
.
getVarMatch
(
key
)
for
key
,
value
in
identity_criterion_dict
.
iteritems
():
if
key
==
workflow_state_var
:
# instead of having {'validation_state': 'draft'}, we want to have
# {'translated_validation_state_title': 'Brouillon'}
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Worklist_getCriterionPropertyItemList.py
0 → 100644
View file @
49de5527
workflow
=
context
.
getParentValue
()
state_variable
=
workflow
.
getStateVariable
()
from
Products.ERP5Type.Tool.WorkflowTool
import
SECURITY_PARAMETER_ID
item_list
=
[(
state_variable
,
state_variable
),
(
SECURITY_PARAMETER_ID
,
SECURITY_PARAMETER_ID
)]
for
variable
in
workflow
.
getVariableValueList
():
if
variable
.
isForCatalog
():
variable_reference
=
variable
.
getReference
()
item_list
.
append
((
variable_reference
,
variable_reference
))
return
item_list
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Worklist_getCriterionPropertyItemList.xml
0 → 100644
View file @
49de5527
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"PythonScript"
module=
"Products.PythonScripts.PythonScript"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
Script_magic
</string>
</key>
<value>
<int>
3
</int>
</value>
</item>
<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>
<item>
<key>
<string>
name_container
</string>
</key>
<value>
<string>
container
</string>
</value>
</item>
<item>
<key>
<string>
name_context
</string>
</key>
<value>
<string>
context
</string>
</value>
</item>
<item>
<key>
<string>
name_m_self
</string>
</key>
<value>
<string>
script
</string>
</value>
</item>
<item>
<key>
<string>
name_subpath
</string>
</key>
<value>
<string>
traverse_subpath
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key>
<string>
_params
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Worklist_getCriterionPropertyItemList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Worklist_view.xml
View file @
49de5527
...
...
@@ -35,7 +35,24 @@
</item>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
Base_edit
</string>
</value>
<value>
<string>
Predicate_edit
</string>
</value>
</item>
<item>
<key>
<string>
action_title
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
edit_order
</string>
</key>
<value>
<list>
<string>
membership_criterion_category_list
</string>
<string>
membership_criterion_document_list
</string>
</list>
</value>
</item>
<item>
<key>
<string>
encoding
</string>
</key>
...
...
@@ -80,7 +97,9 @@
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<list/>
<list>
<string>
listbox_identity
</string>
</list>
</value>
</item>
<item>
...
...
@@ -90,14 +109,12 @@
<string>
my_id
</string>
<string>
my_reference
</string>
<string>
my_title
</string>
<string>
my_criterion_property_list
</string>
<string>
my_description
</string>
<string>
my_matched_portal_type_list
</string>
<string>
my_matched_simulation_state_list
</string>
<string>
my_matched_validation_state_list
</string>
<string>
my_matched_causality_state_list
</string>
<string>
my_action_name
</string>
<string>
my_action
</string>
<string>
my_icon
</string>
<string>
my_action_type2
</string>
<string>
my_action_type
</string>
</list>
</value>
...
...
@@ -152,6 +169,10 @@
<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>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Worklist_view/listbox.xml
View file @
49de5527
This diff is collapsed.
Click to expand it.
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Worklist_view/listbox_identity.xml
0 → 100644
View file @
49de5527
This diff is collapsed.
Click to expand it.
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Worklist_view/my_action_type.xml
View file @
49de5527
...
...
@@ -10,7 +10,6 @@
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
description
</string>
<string>
title
</string>
</list>
</value>
...
...
@@ -42,6 +41,10 @@
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
...
...
@@ -57,6 +60,10 @@
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
...
...
@@ -64,18 +71,18 @@
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
The category of the transition displayed in Action Box.
</string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_
string_field
</string>
</value>
<value>
<string>
my_
category
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Display in Action Box Category
</string>
</value>
...
...
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Worklist_view/my_
matched_portal_type_list
.xml
→
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Worklist_view/my_
action_type2
.xml
View file @
49de5527
...
...
@@ -10,14 +10,14 @@
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
items
</string>
<string>
description
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_
matched_portal_type_list
</string>
</value>
<value>
<string>
my_
action_type2
</string>
</value>
</item>
<item>
<key>
<string>
message_values
</string>
</key>
...
...
@@ -42,10 +42,6 @@
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
...
...
@@ -61,20 +57,6 @@
<key>
<string>
form_id
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
items
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string></string>
</value>
</item>
</dictionary>
</value>
</item>
...
...
@@ -82,27 +64,21 @@
<key>
<string>
values
</string>
</key>
<value>
<dictionary>
<item>
<key>
<string>
description
</string>
</key>
<value>
<string>
The category of the transition displayed in Action Box.
</string>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_
parallel_list
_field
</string>
</value>
<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>
items
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Cataloged Portal Type Matches
</string>
</value>
<value>
<string>
Display in Action Box Category
</string>
</value>
</item>
</dictionary>
</value>
...
...
@@ -110,17 +86,4 @@
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: [(x.getId(), x.getId()) for x in here.getPortalObject().portal_types.objectValues()]
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Worklist_view/my_criterion_property_list.xml
0 → 100644
View file @
49de5527
This diff is collapsed.
Click to expand it.
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Worklist_view/my_matched_causality_state_list.xml
deleted
100644 → 0
View file @
0ff01552
<?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>
items
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_matched_causality_state_list
</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>
<item>
<key>
<string>
target
</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>
<item>
<key>
<string>
items
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</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_parallel_list_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
items
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Matched Causality State
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: [(x.getTitle(), x.getReference()) for x in here.getParent().objectValues(portal_type=\'State\')]
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Worklist_view/my_matched_simulation_state_list.xml
deleted
100644 → 0
View file @
0ff01552
<?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>
items
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_matched_simulation_state_list
</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>
<item>
<key>
<string>
target
</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>
<item>
<key>
<string>
items
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</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_parallel_list_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
items
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Matched Simulation State
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: [(x.getTitle(), x.getReference()) for x in here.getParent().objectValues(portal_type=\'State\')]
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Worklist_view/my_matched_validation_state_list.xml
deleted
100644 → 0
View file @
0ff01552
<?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>
items
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
my_matched_validation_state_list
</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>
<item>
<key>
<string>
target
</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>
<item>
<key>
<string>
items
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string></string>
</value>
</item>
<item>
<key>
<string>
title
</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_parallel_list_field
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
items
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Matched Validation State
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"TALESMethod"
module=
"Products.Formulator.TALESField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_text
</string>
</key>
<value>
<string>
python: [(x.getTitle(), x.getReference()) for x in here.getParent().objectValues(portal_type=\'State\')]
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/Worklist.xml
deleted
100644 → 0
View file @
0ff01552
<?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>
Worklist
</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/Worklist/matched_causality_state_property.xml
deleted
100644 → 0
View file @
0ff01552
<?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>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/lines
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
matched_causality_state
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
matched_causality_state_property
</string>
</value>
</item>
<item>
<key>
<string>
multivalued
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<string>
python: []
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/Worklist/matched_portal_type_property.xml
deleted
100644 → 0
View file @
0ff01552
<?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>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/lines
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
matched_portal_type_property
</string>
</value>
</item>
<item>
<key>
<string>
multivalued
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<string>
python: []
</string>
</value>
</item>
<item>
<key>
<string>
storage_id
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/Worklist/matched_simulation_state_property.xml
deleted
100644 → 0
View file @
0ff01552
<?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>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/lines
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
matched_simulation_state_property
</string>
</value>
</item>
<item>
<key>
<string>
multivalued
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<string>
python: []
</string>
</value>
</item>
<item>
<key>
<string>
storage_id
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/Worklist/matched_validation_state_property.xml
deleted
100644 → 0
View file @
0ff01552
<?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>
categories
</string>
</key>
<value>
<tuple>
<string>
elementary_type/lines
</string>
</tuple>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
<value>
<none/>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
matched_validation_state_property
</string>
</value>
</item>
<item>
<key>
<string>
multivalued
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
portal_type
</string>
</key>
<value>
<string>
Standard Property
</string>
</value>
</item>
<item>
<key>
<string>
property_default
</string>
</key>
<value>
<string>
python: []
</string>
</value>
</item>
<item>
<key>
<string>
storage_id
</string>
</key>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
product/ERP5/bootstrap/erp5_property_sheets/bt/template_property_sheet_id_list
View file @
49de5527
...
...
@@ -194,4 +194,3 @@ AttributeBlacklistedConstraint
CaptchaPreference
GeographicalPoint
Interaction
\ No newline at end of file
Worklist
\ No newline at end of file
product/ERP5Type/Core/Workflow.py
View file @
49de5527
...
...
@@ -510,21 +510,7 @@ class Workflow(XMLObject):
action_box_name
=
worklist_definition
.
getActionName
()
guard_role_list
=
worklist_definition
.
getGuardRoleList
()
if
action_box_name
:
variable_match
=
{}
for
key
in
worklist_definition
.
getVarMatchKeys
():
var
=
worklist_definition
.
getVarMatch
(
key
)
if
isinstance
(
var
,
Expression
):
if
state_change_information
is
None
:
state_change_information
=
StateChangeInfo
(
portal
,
self
,
kwargs
=
info
.
__dict__
.
copy
())
if
expression_context
is
None
:
expression_context
=
createExpressionContext
(
state_change_information
)
evaluated_value
=
var
(
expression_context
)
if
isinstance
(
evaluated_value
,
(
str
,
int
,
long
)):
evaluated_value
=
[
str
(
evaluated_value
)]
else
:
evaluated_value
=
[
x
%
info
for
x
in
var
]
variable_match
[
key
]
=
evaluated_value
variable_match
=
worklist_definition
.
getIdentityCriterionDict
()
portal_type_match
=
variable_match
.
get
(
'portal_type'
)
if
portal_type_match
:
# in case the current workflow is not associated with portal_types
...
...
@@ -540,8 +526,7 @@ class Workflow(XMLObject):
not
check_guard
or
worklist_definition
.
checkGuard
(
security_manager
,
self
,
portal
,
check_roles
=
False
)
portal
)
):
format_data
=
TemplateDict
()
format_data
.
_push
(
info
)
...
...
product/ERP5Type/Core/Worklist.py
View file @
49de5527
...
...
@@ -35,10 +35,12 @@ from Products.ERP5Type import Permissions
from
Products.ERP5Type.id_as_reference
import
IdAsReferenceMixin
from
Products.ERP5Type.XMLObject
import
XMLObject
from
Products.ERP5Type.mixin.guardable
import
GuardableMixin
from
Products.ERP5Type.Core.Predicate
import
Predicate
from
Products.ERP5Type.Utils
import
deprecated
tales_re
=
re
.
compile
(
r'(\
w+:)?(.*)
')
class Worklist(IdAsReferenceMixin("worklist_"),
XMLObject, GuardableMixin
):
class Worklist(IdAsReferenceMixin("worklist_"),
GuardableMixin, Predicate
):
"""
A ERP5 Worklist.
Four Variable: portal_type; simulation_state; validation_state; causality_state
...
...
@@ -59,9 +61,9 @@ class Worklist(IdAsReferenceMixin("worklist_"), XMLObject, GuardableMixin):
'
DublinCore
',
'
Reference
',
'
Comment
',
'
Worklist
',
'
Guard
',
'
ActionInformation
',
'
Predicate
',
)
security.declareProtected(Permissions.AccessContentsInformation,
...
...
@@ -124,69 +126,31 @@ class Worklist(IdAsReferenceMixin("worklist_"), XMLObject, GuardableMixin):
workflow_variable_id_list.append(worklist_variable_value.getId())
return res
security.declareProtected(Permissions.AccessContentsInformation,
'
getVariableMatchDict
')
def getIdentityCriterionDict(self):
"""
XXX: Move this to Predicate class?
"""
return dict(self._identity_criterion)
security.declareProtected(Permissions.AccessContentsInformation,
'
getVarMatchKeys
')
@deprecated('
getVarMatchKeys
()
deprecated
;
use
getCriterionPropertyList
()
')
def getVarMatchKeys(self):
key_list = []
if self.getMatchedPortalTypeList():
key_list.append('
portal_type
')
if self.getMatchedSimulationStateList():
key_list.append('
simulation_state
')
if self.getMatchedValidationStateList():
key_list.append('
validation_state
')
if self.getMatchedCausalityState():
key_list.append('
causality_state
')
key_list += [dynamic_variable.getReference() for dynamic_variable in self.objectValues()
if dynamic_variable.getVariableDefaultValue() or dynamic_variable.getVariableDefaultExpression()]
return key_list
"""
DCWorkflow API
"""
return self.getCriterionPropertyList()
security.declareProtected(Permissions.AccessContentsInformation,
'
getVarMatch
')
@deprecated('
getVarMatch
()
deprecated
;
use
getIdentityCriterionDict
()
')
def getVarMatch(self, id):
""" return value of matched keys"""
matches = None
if id == '
portal_type
':
v = self.getMatchedPortalTypeList()
if v: matches = tuple(v)
elif id in ['
validation_state
', '
simulation_state
', '
causality_state
']:
if id == '
validation_state
':
match_reference_list = self.getMatchedValidationStateList()
elif id == '
simulation_state
':
match_reference_list = self.getMatchedSimulationStateList()
elif id == '
causality_state
':
match_reference_list = self.getMatchedCausalityStateList()
matches = tuple(match_reference_list)
elif id:
# Local dynamic variable:
dynamic_variable = self._getOb('
variable_
'+id)
dynamic_variable_value = dynamic_variable.getVariableDefaultValue()
if dynamic_variable_value:
matches = [dynamic_variable_value]
# Override initial value if expression set:
dynamic_variable_default_expression = dynamic_variable.getVariableDefaultExpressionInstance()
if dynamic_variable_default_expression:
matches = dynamic_variable_default_expression
if matches not in ([], None):
if not isinstance(matches, (tuple, Expression)):
# Old version, convert it.
matches = tuple(matches)
return matches
else:
return ()
security.declareProtected(Permissions.AccessContentsInformation,
'
getVarMatchText
')
def getVarMatchText(self, id):
values = self.getVarMatch(id)
if isinstance(values, Expression):
return values.text
return '
;
'.join(values)
return tuple(self._identity_criterion.get(id, ()))
# XXX(PERF): hack to see Category Tool responsability in new workflow slowness
security.declareProtected(Permissions.AccessContentsInformation,
'
getActionType
')
def getActionType(self):
...
...
product/ERP5Type/Tool/PropertySheetTool.py
View file @
49de5527
...
...
@@ -103,7 +103,7 @@ class PropertySheetTool(BaseTool):
'State/acquire_permission_property'
,
'State/selected_property'
,
'State/state_type_property'
,
'
Worklist
'
,
'
Predicate
'
,
'Workflow'
,
'Workflow/manager_bypass_property'
,
'Workflow/state_variable_property'
,
...
...
product/ERP5Type/Tool/WorkflowTool.py
View file @
49de5527
...
...
@@ -46,9 +46,12 @@ from sets import ImmutableSet
from
zLOG
import
LOG
,
WARNING
WORKLIST_METADATA_KEY
=
'metadata'
SECURITY_PARAMETER_ID
=
'local_roles'
COUNT_COLUMN_TITLE
=
'count'
SECURITY_PARAMETER_ID
=
'local_roles'
from
AccessControl.SecurityInfo
import
ModuleSecurityInfo
ModuleSecurityInfo
(
__name__
).
declarePublic
(
'SECURITY_PARAMETER_ID'
)
class
WorkflowTool
(
BaseTool
,
OriginalWorkflowTool
):
"""
A new container for DC workflow and workflow;
...
...
product/ERP5Type/mixin/guardable.py
View file @
49de5527
...
...
@@ -50,7 +50,6 @@ class GuardableMixin(ExpressionMixin('guard_expression')):
security_manager
,
workflow
,
current_object
,
check_roles
=
True
,
**
kw
):
"""
Checks conditions in this guard. Original source code from DCWorkflow
...
...
@@ -78,7 +77,6 @@ class GuardableMixin(ExpressionMixin('guard_expression')):
break
else
:
return
False
if
check_roles
:
guard_role_list
=
self
.
getGuardRoleList
()
if
guard_role_list
:
# Require at least one of the given roles.
...
...
product/ERP5Type/patches/DCWorkflow.py
View file @
49de5527
...
...
@@ -1045,24 +1045,8 @@ def convertToERP5Workflow(self, temp_object=False):
worklist
.
setTitle
(
qdef
.
title
)
worklist
.
setReference
(
qdef
.
id
)
worklist
.
setDescription
(
qdef
.
description
)
for
key
,
values
in
qdef
.
var_matches
.
items
():
if
key
==
'portal_type'
:
worklist
.
setMatchedPortalTypeList
(
values
)
elif
key
==
'simulation_state'
:
worklist
.
setMatchedSimulationStateList
(
values
)
elif
key
==
'validation_state'
:
worklist
.
setMatchedValidationStateList
(
values
)
elif
key
==
'causality_state'
:
worklist
.
setMatchedCausalityState
(
values
)
else
:
# dynamic variable.
worklist_variable_value
=
worklist
.
newContent
(
portal_type
=
'Worklist Variable'
,
reference
=
key
)
if
isinstance
(
values
,
Expression
):
worklist_variable_value
.
setVariableDefaultExpression
(
values
.
text
)
else
:
worklist_variable_value
.
setVariableDefaultValue
(
values
[
0
])
#XXX(WORKFLOW): to be changed
for
key
,
value
in
qdef
.
var_matches
.
items
():
worklist
.
setCriterion
(
key
,
value
)
worklist
.
setAction
(
qdef
.
actbox_url
)
worklist
.
setActionType
(
qdef
.
actbox_category
)
worklist
.
setIcon
(
qdef
.
actbox_icon
)
...
...
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