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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5
Commits
3c4cd011
Commit
3c4cd011
authored
Mar 18, 2013
by
Aurel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
do not expect to fing id/gid in xml + add comment about bad code
parent
fc742e67
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
product/ERP5SyncML/Conduit/ERP5Conduit.py
product/ERP5SyncML/Conduit/ERP5Conduit.py
+9
-2
No files found.
product/ERP5SyncML/Conduit/ERP5Conduit.py
View file @
3c4cd011
...
...
@@ -560,10 +560,14 @@ class ERP5Conduit(XMLSyncUtilsMixin):
# copy of xml object for modification
xml = deepcopy(xml)
object_element = xml.find('object')
if attribute_name == 'id'
:
try
:
del object_element.attrib['gid']
else:
except KeyError:
pass
try:
del object_element.attrib['id']
except KeyError:
pass
object_element.attrib[attribute_name] = new_id
if as_string:
return etree.tostring(xml, encoding="utf-8")
...
...
@@ -1046,6 +1050,9 @@ class ERP5Conduit(XMLSyncUtilsMixin):
"""
# XXX We can not find an object with remote id
if object_id is None:
# XXX object must be retrieved by their GID, id must not be synchronised
# This hack is wrong, unfortunately all units are based on it so I can
# not remove it, all must be reviewed before
object_id = xml.get('id')
if object_id is not None:
if sub_object is None:
...
...
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