Commit 1ba47f63 authored by Sebastien Robin's avatar Sebastien Robin

take into account all inventory modules

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@17254 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5338c74f
...@@ -65,7 +65,9 @@ ...@@ -65,7 +65,9 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>portal = context.getPortalObject() \n <value> <string encoding="cdata"><![CDATA[
portal = context.getPortalObject() \n
if clear_catalog:\n if clear_catalog:\n
# clear the catalog before reindexing\n # clear the catalog before reindexing\n
catalog = portal.portal_catalog.getSQLCatalog(sql_catalog_id)\n catalog = portal.portal_catalog.getSQLCatalog(sql_catalog_id)\n
...@@ -182,9 +184,8 @@ for folder in [context.portal_templates, context.portal_trash,\n ...@@ -182,9 +184,8 @@ for folder in [context.portal_templates, context.portal_trash,\n
\n \n
# Then we index everything except inventories\n # Then we index everything except inventories\n
for folder in portal.objectValues(("ERP5 Folder",)):\n for folder in portal.objectValues(("ERP5 Folder",)):\n
print "#### Indexing contents inside folder %s ####" % folder.id\n if folder.getId().find(\'inventory\') < 0:\n
if folder.getId() not in (\'inventory_module\',):\n print "#### Indexing contents inside folder %s ####" % folder.id\n
\n
folder.activate(\n folder.activate(\n
tag=folder_tag,\n tag=folder_tag,\n
priority=object_priority,\n priority=object_priority,\n
...@@ -201,7 +202,7 @@ for folder in portal.objectValues(("ERP5 Folder",)):\n ...@@ -201,7 +202,7 @@ for folder in portal.objectValues(("ERP5 Folder",)):\n
object_tag = \'inventory\'\n object_tag = \'inventory\'\n
object_after_tag = (\'module\', \'category\', \'person_stage_1\', \'document\', \'group_person_stage_1\')\n object_after_tag = (\'module\', \'category\', \'person_stage_1\', \'document\', \'group_person_stage_1\')\n
for folder in portal.objectValues(("ERP5 Folder",)):\n for folder in portal.objectValues(("ERP5 Folder",)):\n
if folder.getId() in (\'inventory_module\',):\n if folder.getId().find(\'inventory\') >= 0: \n
print "#### Indexing contents inside folder %s ####" % folder.id\n print "#### Indexing contents inside folder %s ####" % folder.id\n
folder.activate(\n folder.activate(\n
tag=folder_tag,\n tag=folder_tag,\n
...@@ -236,7 +237,9 @@ if final_activity_tag is not None:\n ...@@ -236,7 +237,9 @@ if final_activity_tag is not None:\n
).getId()\n ).getId()\n
\n \n
return printed\n return printed\n
</string> </value>
]]></string> </value>
</item> </item>
<item> <item>
<key> <string>_code</string> </key> <key> <string>_code</string> </key>
......
535 544
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment