diff --git a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/delivery_movement_simulation_interaction_workflow/scripts/DeliveryMovement_unlinkSimulation.xml b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/delivery_movement_simulation_interaction_workflow/scripts/DeliveryMovement_unlinkSimulation.xml index 4be675063bd8d9453a1b4f6fae1ab4a7aea549da..7a4e00b04495e4fa38e9cf6edd666b95cba44498 100644 --- a/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/delivery_movement_simulation_interaction_workflow/scripts/DeliveryMovement_unlinkSimulation.xml +++ b/product/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/delivery_movement_simulation_interaction_workflow/scripts/DeliveryMovement_unlinkSimulation.xml @@ -65,7 +65,15 @@ </item> <item> <key> <string>_body</string> </key> - <value> <string>delivery_movement = state_change[\'object\']\n + <value> <string>"""Unlink simulation movements when delivery movement is deleted.\n +This way when a delivery movement is deleted, corresponding simulation movement\n +will again be candidates for building in another delivery.\n +\n +XXX: security (future) bug: this requires that the system is configured in a way where \n +simulation movement can be accessed in restrictred mode. For now this script has a proxy\n +role, but someday we\'ll have to move this to unrestricted environment.\n +"""\n +delivery_movement = state_change[\'object\']\n \n # Clean simulation\n simulation_movement_list = delivery_movement.getDeliveryRelatedValueList(\n @@ -91,6 +99,14 @@ for simulation_movement in simulation_movement_list:\n <key> <string>_params</string> </key> <value> <string>state_change</string> </value> </item> + <item> + <key> <string>_proxy_roles</string> </key> + <value> + <tuple> + <string>Manager</string> + </tuple> + </value> + </item> <item> <key> <string>errors</string> </key> <value> diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision index ce125d2e2876748bf9cfde827311e1f030a11f06..54d5fa6f52fd8cf8765513c6457a9ba6147b718a 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/revision +++ b/product/ERP5/bootstrap/erp5_core/bt/revision @@ -1 +1 @@ -879 \ No newline at end of file +881 \ No newline at end of file