Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Arnaud Fontaine
erp5
Commits
db017786
Commit
db017786
authored
Jun 12, 2014
by
Aurel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make indexation of document into syncml works even for data coming from integration modules
parent
54da4f63
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
19 deletions
+29
-19
bt5/erp5_syncml/SkinTemplateItem/portal_skins/erp5_syncml/SQLCatalog_indexSyncMLDocumentList.xml
..._skins/erp5_syncml/SQLCatalog_indexSyncMLDocumentList.xml
+28
-18
bt5/erp5_syncml/bt/revision
bt5/erp5_syncml/bt/revision
+1
-1
No files found.
bt5/erp5_syncml/SkinTemplateItem/portal_skins/erp5_syncml/SQLCatalog_indexSyncMLDocumentList.xml
View file @
db017786
...
@@ -53,7 +53,6 @@
...
@@ -53,7 +53,6 @@
<value>
<string>
if not len(path_list):\n
<value>
<string>
if not len(path_list):\n
return\n
return\n
restrictedTraverse = context.getPortalObject().restrictedTraverse\n
restrictedTraverse = context.getPortalObject().restrictedTraverse\n
argument_getter_dict = {}\n
if subscription_path:\n
if subscription_path:\n
subscription = restrictedTraverse(subscription_path)\n
subscription = restrictedTraverse(subscription_path)\n
getId = subscription.getGidFromObject\n
getId = subscription.getGidFromObject\n
...
@@ -63,26 +62,37 @@ else:\n
...
@@ -63,26 +62,37 @@ else:\n
\n
\n
method = context.z_catalog_syncml_document_list\n
method = context.z_catalog_syncml_document_list\n
\n
\n
parameter_append_list = []\n
def generateParameterList():\n
append = parameter_append_list.append\n
parameter_append_list = []\n
parameter_dict = {}\n
append = parameter_append_list.append\n
for property in method.arguments_src.split():\n
parameter_dict = {}\n
parameter_dict[property] = parameter_value_list = []\n
for property in method.arguments_src.split():\n
if property == \'getData\':\n
parameter_dict[property] = parameter_value_list = []\n
getter = getData\n
if property == \'getData\':\n
elif property == \'getId\':\n
getter = getData\n
getter = getId\n
elif property == \'getId\':\n
else:\n
getter = getId\n
getter = None\n
else:\n
if getter is None:\n
getter = None\n
getter = lambda obj, property=property: getattr(obj, property)()\n
if getter is None:\n
append((parameter_value_list, getter))\n
getter = lambda obj, property=property: getattr(obj, property)()\n
append((parameter_value_list, getter))\n
return parameter_dict, parameter_append_list\n
\n
MAX_PER_QUERY = 1000\n
\n
\n
for path in path_list:\n
for path in path_list:\n
obj = restrictedTraverse(path)\n
obj = restrictedTraverse(path)\n
for value_list, getter in parameter_append_list:\n
if obj.getPortalType() == "Integration Module":\n
value_list.append(getter(obj))\n
object_list = obj()\n
method(**parameter_dict)\n
else:\n
object_list = [obj,]\n
for x in xrange(0, len(object_list), MAX_PER_QUERY):\n
parameter_dict, parameter_append_list = generateParameterList()\n
for obj in object_list[x:x+MAX_PER_QUERY]:\n
for value_list, getter in parameter_append_list:\n
value_list.append(getter(obj))\n
method(**parameter_dict)\n
</string>
</value>
</string>
</value>
</item>
</item>
<item>
<item>
...
...
bt5/erp5_syncml/bt/revision
View file @
db017786
121
122
\ No newline at end of file
\ No newline at end of file
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