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
Carlos Ramos Carreño
erp5
Commits
3a6d7e0c
Commit
3a6d7e0c
authored
Jan 06, 2021
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: ERP5Workflow: Fix testWorklist.
parent
18aa5d85
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testWorklist.py
...tTemplateItem/portal_components/test.erp5.testWorklist.py
+9
-10
No files found.
bt5/erp5_core_test/TestTemplateItem/portal_components/test.erp5.testWorklist.py
View file @
3a6d7e0c
...
...
@@ -175,9 +175,9 @@ class TestWorklist(ERP5TypeTestCase):
worklist_value.setReference(worklist_id)
# Configure new workflow:
actbox_name='
%
s
(
%%
(
count
)
s
)
' % actbox_name
worklist_value.setAct
box
Name(str(actbox_name))
worklist_value.setAct
boxUrl
(str(actbox_url))
worklist_value.setAct
boxCategory(str('
global
')
)
worklist_value.setAct
ion
Name(str(actbox_name))
worklist_value.setAct
ion
(str(actbox_url))
worklist_value.setAct
ionType('
global
'
)
props={k if k.startswith('
guard_
') else '
variable_
' + k: v
for k, v in kw.iteritems()}
...
...
@@ -188,7 +188,7 @@ class TestWorklist(ERP5TypeTestCase):
if '
variable_validation_state
' in props:
v = props.get('
variable_validation_state
', None)
if v:
worklist_value.setMatchedValidationState(
'
state_
'+
v)
worklist_value.setMatchedValidationState(v)
if '
variable_
' + self.int_catalogued_variable_id in props:
variable_ref = self.int_catalogued_variable_id
v = props.get('
variable_
'+self.int_catalogued_variable_id, None)
...
...
@@ -198,7 +198,7 @@ class TestWorklist(ERP5TypeTestCase):
if variable_value is None:
variable_value = worklist_value.newContent(portal_type='
Worklist
Variable
')
variable_value.setReference(variable_ref)
variable_value.set
Initial
Value(str(v))
variable_value.set
Variable
Value(str(v))
# test04 related key
if '
variable_region_uid
' in props:
v = props.get('
variable_region_uid
', None)
...
...
@@ -207,24 +207,23 @@ class TestWorklist(ERP5TypeTestCase):
if variable_value is None:
variable_value = worklist_value.newContent(portal_type='
Worklist
Variable
')
variable_value.setReference('
region_uid
')
variable_value.set
DefaultExpr
(v)
variable_value.set
VariableExpressionText
(v)
if '
variable_base_category_id
' in props:
variable_value = worklist_value._getOb('
variable_base_category_id
', None)
v = props.get('
variable_base_category_id
', None)
if variable_value is None:
variable_value = worklist_value.newContent(portal_type='
Worklist
Variable
')
variable_value.setReference('
base_category_id
')
variable_value.set
Initial
Value(v)
variable_value.set
Variable
Value(v)
# Update guard configuration for view and guard value.
if '
guard_roles
' in props:
v = props.get('
guard_roles
', '')
if v:
worklist_value.setRoleList([ var.strip() for var in v.split('
;
') ])
worklist_value.set
Guard
RoleList([ var.strip() for var in v.split('
;
') ])
if '
guard_expr
' in props:
v = props.get('
guard_expr
', '')
if v:
worklist_value.setExpression(v)
worklist_value.getGuard()
worklist_value.setGuardExpression(v)
else:
worklists = workflow_value.worklists
worklists.addWorklist(worklist_id)
...
...
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