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
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastien Robin
erp5
Commits
7e4757d2
Commit
7e4757d2
authored
Feb 10, 2017
by
Sebastien Robin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Workflow: avoid to add more getToolByName
parent
de899bbd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
product/ERP5/Document/BusinessTemplate.py
product/ERP5/Document/BusinessTemplate.py
+3
-3
No files found.
product/ERP5/Document/BusinessTemplate.py
View file @
7e4757d2
...
...
@@ -2410,7 +2410,7 @@ class PortalTypeWorkflowChainTemplateItem(BaseTemplateItem):
# if nothing or +, chain is added to the existing one
# if - chain is removed from the exisiting one
# if = chain replaced the existing one
types_tool
=
getToolByName
(
self
.
getPortalObject
(),
'portal_types'
)
types_tool
=
self
.
getPortalObject
().
portal_types
for
key
in
self
.
_archive
.
keys
():
wflist
=
key
.
split
(
' | '
)
if
len
(
wflist
)
==
2
:
...
...
@@ -2474,7 +2474,7 @@ class PortalTypeWorkflowChainTemplateItem(BaseTemplateItem):
update_dict
=
kw
.
get
(
'object_to_update'
)
force
=
kw
.
get
(
'force'
)
installed_bt
=
kw
.
get
(
'installed_bt'
)
types_tool
=
getToolByName
(
self
.
getPortalObject
(),
'portal_types'
)
types_tool
=
self
.
getPortalObject
().
portal_types
changed
=
False
if
installed_bt
is
not
None
:
previous_portal_type_workflow_chain_list
=
list
(
installed_bt
\
...
...
@@ -2554,7 +2554,7 @@ class PortalTypeWorkflowChainTemplateItem(BaseTemplateItem):
self
.
_resetDynamicModules
()
def
uninstall
(
self
,
context
,
**
kw
):
types_tool
=
getToolByName
(
self
.
getPortalObject
(),
'portal_types'
)
types_tool
=
self
.
getPortalObject
().
portal_types
object_path
=
kw
.
get
(
'object_path'
,
None
)
if
object_path
is
not
None
:
object_key_list
=
[
object_path
]
...
...
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