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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
c21515a3
Commit
c21515a3
authored
Mar 19, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WorkflowTool: skip worklists without reference when computing
Otherwise we get an error when just adding a worklist
parent
a0aa9184
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
0 deletions
+30
-0
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testWorklist.py
...tTemplateItem/portal_components/test.erp5.testWorklist.py
+28
-0
product/ERP5Type/Tool/WorkflowTool.py
product/ERP5Type/Tool/WorkflowTool.py
+2
-0
No files found.
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testWorklist.py
View file @
c21515a3
...
...
@@ -255,6 +255,34 @@ class TestWorklist(TestWorkflowMixin):
self
.
worklist_int_variable_id
,
])
def
test_edit_worklist_view
(
self
):
"""Checks we can view and edit worklist.
"""
def
check_visible
(
worklist
):
self
.
clearCache
()
worklist
.
view
()
workflow_value
=
self
.
getWorkflowTool
()[
self
.
checked_workflow
]
# edit reference first
worklist_value
=
workflow_value
.
newContent
(
portal_type
=
'Worklist'
)
check_visible
(
worklist_value
)
worklist_value
.
setReference
(
self
.
worklist_assignor_id
)
check_visible
(
worklist_value
)
worklist_value
.
setActionName
(
'Test (%(count)s)'
)
worklist_value
.
setAction
(
'/'
)
worklist_value
.
setActionType
(
'global'
)
check_visible
(
worklist_value
)
# edit reference last
worklist_value
=
workflow_value
.
newContent
(
portal_type
=
'Worklist'
)
check_visible
(
worklist_value
)
worklist_value
.
setActionName
(
'Test (%(count)s)'
)
worklist_value
.
setAction
(
'/'
)
worklist_value
.
setActionType
(
'global'
)
check_visible
(
worklist_value
)
worklist_value
.
setReference
(
self
.
worklist_owner_id
)
check_visible
(
worklist_value
)
def
test_01_permission
(
self
,
quiet
=
0
,
run
=
run_all_test
):
"""
Test the permission of the building module.
...
...
product/ERP5Type/Tool/WorkflowTool.py
View file @
c21515a3
...
...
@@ -755,6 +755,8 @@ def groupWorklistListByCondition(worklist_dict, sql_catalog,
metadata_dict
=
{}
for
workflow_id
,
worklist
in
six
.
iteritems
(
worklist_dict
):
for
worklist_id
,
worklist_match_dict
in
six
.
iteritems
(
worklist
):
if
not
worklist_id
:
continue
workflow_worklist_key
=
'/'
.
join
((
workflow_id
,
worklist_id
))
if
getSecurityUidDictAndRoleColumnDict
is
None
:
valid_criterion_dict
,
metadata
=
getValidCriterionDict
(
...
...
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