diff --git a/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/interactions/ransformationDescendant_reindexTransformationResource.xml b/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/interactions/TransformationDescendant_reindexTransformationResource.xml similarity index 96% rename from bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/interactions/ransformationDescendant_reindexTransformationResource.xml rename to bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/interactions/TransformationDescendant_reindexTransformationResource.xml index 65ac193047aa4fcb7cb20e12cfe28069ed6f50ff..04391b623242c65fe8ea62c5b207d91d43f85d9b 100644 --- a/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/interactions/ransformationDescendant_reindexTransformationResource.xml +++ b/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/interactions/TransformationDescendant_reindexTransformationResource.xml @@ -53,7 +53,7 @@ </item> <item> <key> <string>id</string> </key> - <value> <string>ransformationDescendant_reindexTransformationResource</string> </value> + <value> <string>TransformationDescendant_reindexTransformationResource</string> </value> </item> <item> <key> <string>method_id</string> </key> diff --git a/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/interactions/Transformation_resourceReindex.xml b/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/interactions/Transformation_resourceReindex.xml index 1b7e282eb818cf390585455e9ce5a9ccf4d67afc..1ea361f16e80b89c4f1e905a9ed62ea3a1376141 100644 --- a/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/interactions/Transformation_resourceReindex.xml +++ b/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/interactions/Transformation_resourceReindex.xml @@ -59,7 +59,6 @@ <key> <string>method_id</string> </key> <value> <list> - <string>newContent</string> <string>_setVariationBaseCategory.*</string> <string>_setVersion</string> </list> @@ -67,7 +66,7 @@ </item> <item> <key> <string>once_per_transaction</string> </key> - <value> <int>0</int> </value> + <value> <int>1</int> </value> </item> <item> <key> <string>portal_type_filter</string> </key> diff --git a/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/scripts/TransformationDescendant_reindexTransformationResource.xml b/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/scripts/TransformationDescendant_reindexTransformationResource.xml index 00c3865e374a59e201ca9ea0c76732dd34024b85..36feb0feff8a9998e8a1309ace9e7913165666bc 100644 --- a/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/scripts/TransformationDescendant_reindexTransformationResource.xml +++ b/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/scripts/TransformationDescendant_reindexTransformationResource.xml @@ -61,7 +61,8 @@ while transformation.getPortalType() != "Transformation":\n transformation = transformation.getParentValue()\n \n resource = transformation.getResourceValue()\n -resource.reindexObject()\n +if resource is not None:\n + resource.reindexObject()\n </string> </value> </item> <item> @@ -103,6 +104,7 @@ resource.reindexObject()\n <string>transformation</string> <string>_getattr_</string> <string>resource</string> + <string>None</string> </tuple> </value> </item> diff --git a/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/scripts/Transformation_reindexResource.xml b/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/scripts/Transformation_reindexResource.xml index c47d7fd0014e580677a41a4542b6f3901f7b6f0a..b44f5475fda77abb546694e767ffc4911733cdb2 100644 --- a/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/scripts/Transformation_reindexResource.xml +++ b/bt5/erp5_pdm/WorkflowTemplateItem/portal_workflow/conversion_interaction_workflow/scripts/Transformation_reindexResource.xml @@ -53,7 +53,11 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string>state_change[\'object\'].getResourceValue().reindexObject()\n + <value> <string>transformation = state_change[\'object\']\n +resource = transformation.getResourceValue()\n +\n +if resource is not None:\n + resource.reindexObject()\n </string> </value> </item> <item> @@ -91,8 +95,11 @@ <value> <tuple> <string>state_change</string> - <string>_getattr_</string> <string>_getitem_</string> + <string>transformation</string> + <string>_getattr_</string> + <string>resource</string> + <string>None</string> </tuple> </value> </item> diff --git a/bt5/erp5_pdm/bt/revision b/bt5/erp5_pdm/bt/revision index 2da432533140eaf6c69faa66982fee3287473121..7d4983b9898662edf7c4b760af9ab971404ddd74 100644 --- a/bt5/erp5_pdm/bt/revision +++ b/bt5/erp5_pdm/bt/revision @@ -1 +1 @@ -457 \ No newline at end of file +458 \ No newline at end of file