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
iv
erp5
Commits
fb9ab20f
Commit
fb9ab20f
authored
Nov 29, 2011
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid calling interaction workflow when synchronizing objects with ERP5SyncML.
parent
8c853e16
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
product/ERP5SyncML/Conduit/ERP5Conduit.py
product/ERP5SyncML/Conduit/ERP5Conduit.py
+5
-1
product/ERP5Type/Base.py
product/ERP5Type/Base.py
+10
-0
No files found.
product/ERP5SyncML/Conduit/ERP5Conduit.py
View file @
fb9ab20f
...
@@ -984,7 +984,11 @@ class ERP5Conduit(XMLSyncUtilsMixin):
...
@@ -984,7 +984,11 @@ class ERP5Conduit(XMLSyncUtilsMixin):
This
is
the
default
editDocument
method
.
This
method
This
is
the
default
editDocument
method
.
This
method
can
easily
be
overwritten
.
can
easily
be
overwritten
.
"""
"""
object._v_inhibit_workflow = True
try:
object._edit(**kw)
object._edit(**kw)
finally:
object._v_inhibit_workflow = False
security.declareProtected(Permissions.ModifyPortalContent, 'getProperty')
security.declareProtected(Permissions.ModifyPortalContent, 'getProperty')
def getProperty(self, object, kw):
def getProperty(self, object, kw):
...
...
product/ERP5Type/Base.py
View file @
fb9ab20f
...
@@ -174,6 +174,16 @@ class WorkflowMethod(Method):
...
@@ -174,6 +174,16 @@ class WorkflowMethod(Method):
# XXX I must think that what is a correct behavior.(Yusei)
# XXX I must think that what is a correct behavior.(Yusei)
return
self
.
_m
(
instance
,
*
args
,
**
kw
)
return
self
.
_m
(
instance
,
*
args
,
**
kw
)
# XXX Ugly hack to avoid calling interaction workflow when synchronizing
# objects with ERP5SyncML as it leads to unwanted side-effects on the
# object being synchronized, such as undesirable workflow history being
# added (for example edit_workflow) and double conversion for OOo
# documents (for example document_conversion_interaction_workflow defined
# for _setData()) making the source and destination XML representation
# different.
if
getattr
(
instance
,
'_v_inhibit_workflow'
,
False
):
return
apply
(
self
.
__dict__
[
'_m'
],
(
instance
,)
+
args
,
kw
)
# Build a list of transitions which may need to be invoked
# Build a list of transitions which may need to be invoked
instance_path
=
instance
.
getPhysicalPath
()
instance_path
=
instance
.
getPhysicalPath
()
portal_type
=
instance
.
portal_type
portal_type
=
instance
.
portal_type
...
...
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