Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
Commits
638caa0a
Commit
638caa0a
authored
Jul 30, 2015
by
wenjie.zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Variable.py: add setProperties, which is required in creating preconfiguredWorkflow.
parent
c17da2c1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
product/ERP5Workflow/Document/Variable.py
product/ERP5Workflow/Document/Variable.py
+23
-0
No files found.
product/ERP5Workflow/Document/Variable.py
View file @
638caa0a
...
...
@@ -99,3 +99,26 @@ class Variable(IdAsReferenceMixin("variable_", "prefix"), XMLObject):
if
self
.
info_guard
is
not
None
:
res
=
self
.
info_guard
.
getSummary
()
return
res
# initial pre-configured workflow's variables
def
setProperties
(
self
,
description
,
default_value
=
''
,
default_expr
=
''
,
for_catalog
=
0
,
for_status
=
0
,
update_always
=
0
,
props
=
None
,
REQUEST
=
None
):
self
.
setDescription
(
str
(
description
))
self
.
setInitialValue
(
str
(
default_value
))
if
default_expr
:
self
.
setDefaultExpr
(
default_expr
)
else
:
self
.
default_expr
=
None
g
=
Guard
()
if
g
.
changeFromProperties
(
props
or
REQUEST
):
self
.
info_guard
=
g
else
:
self
.
info_guard
=
None
self
.
setForCatalog
(
bool
(
for_catalog
))
self
.
setForStatus
(
bool
(
for_status
))
self
.
setAutomaticUpdate
(
bool
(
update_always
))
if
REQUEST
is
not
None
:
return
self
.
manage_properties
(
REQUEST
,
'Properties changed.'
)
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